raptor.defineModule("com.ebay.raptor.vi.AjaxUtil",function(){return{getJSON:function(b,a,c,e,f){var d=null;b&&(d=$.getJSON(b+"&"+(f?f:"cb")+"=?",function(){a&&a.apply(c,arguments)}));d&&e&&d.always(function(){e.apply(c,arguments)})},extractInlineCss:function(b){var a=document.createElement("style");a.type="text/css";a.styleSheet?a.styleSheet.cssText=b:a.appendChild(document.createTextNode(b));document.getElementsByTagName("head")[0].appendChild(a)},loadScripts:function(b,a,c){b?c?$.ajax({url:a,dataType:"script", cache:!0,success:c}):$.ajax({url:a,dataType:"script",cache:!0}):(b=document.createElement("script"),b.type="text/javascript",b.text=a,document.getElementsByTagName("head")[0].appendChild(b))}}});raptor.defineClass("ui.InlineFeedbackLink",function(){return{init:function(){var c=$("#"+this._id);if("true"==c.find("#epconfigured").val()){var d=encodeURIComponent(c.find("#srvName").val()),a=c.find("#linkcontent").val();c.find("#surveylink").html(a);var a=c.find("#domSubmit")[0],b;a.contentDocument?b=a.contentDocument:a.contentWindow?b=a.contentWindow.document:window.frames.domSubmit&&(b=window.frames.domSubmit.document);b&&(b.open(),a=c.find("#surveyDiv")[0],b.write(a.innerHTML),b.close());a= c.find("#surveytld").val();if(!a||"null"==a||"undefined"==a)a=location.hostname.lastIndexOf("."),a=0>a?"com":location.hostname.substring(a+1,location.hostname.length);a="https://qu.ebay."+a+"/survey?srvName=";b.getElementById("surveyForm").setAttribute("action",a+d);c.find("#surveylink").click(function(){var a=document.getElementsByTagName("html")[0].innerHTML,a=""+a+"";b.getElementById("domContent").value=encodeURIComponent(a);b.getElementById("pageUrlHidden").value=encodeURIComponent(location.href); var a=Math.round((screen.height-800)/2),c=Math.round((screen.width-800)/2);window.open("","eBaySurvey","top="+a+",left="+c+",height=800px,width=800px,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");b.getElementById("surveyForm").submit()})}}}});raptor.defineClass("ebay.viewItem.Incentives",function(){return{init:function(a){this.conf=a;this.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");this.pubsub=raptor.require("pubsub");a.isRewardsCall&&this.makeRewardsCall()},makeRewardsCall:function(){var a=this.conf;a.rewardsUrl&&this.ajaxRequest(a.rewardsUrl+"&item="+a.itemId+"&cguid="+a.cguid)},ajaxRequest:function(a){this.ajaxUtil.getJSON(a,this.processResponse,this)},processResponse:function(a){var b=this.conf;if(a){a.css&&this.ajaxUtil.extractInlineCss(a.css); if(!a.eBayIncentiveOfferMsg){b.isShowNectarPoints||b.isShowVoucher?(a.nectarMainMsg&&this.paintHtml(a.nectarMainMsg,b.rewardsDiv),a.nectarOverlayContent&&($("#vi-inc-nector-msg").html(a.nectarOverlayContent),this.pubsub.publish("_BIND_OLAY",{cmpId:"vi-inc-nector-msg-oly",trigger:"nectarDetails"})),a.voucherOverlayContent&&($("#vi-inc-nector-voucher-msg").html(a.voucherOverlayContent),this.pubsub.publish("_BIND_OLAY",{cmpId:"vi-inc-nector-voucher-msg-oly",trigger:"vouchershowmehow"}))):a.ebayBucksMsg&& b.isRewardsJSON&&this.paintHtml(a.ebayBucksMsg,b.rewardsDiv);if(a.bmlPromotionMsg){var c=a.bmlPromotionMsg.replace('/aw/pics/payments/bml/logoBML_77x18.gif" height="18" width="77"','/aw/pics/logos/logoPaypalCredit_160x55.png" height" height="29" width="82"',"g");this.paintHtml(c,b.bmlDiv);c=$(".bmloff_cont").html();this.paintHtml(c,b.ppcDiv)}a.ebayIncentivesMsg&&(this.paintHtml(a.ebayIncentivesMsg,b.couponDiv),a.ebayOverlayIncentiveMsg&&($("#vi-inc-coupn-msg").html(a.ebayOverlayIncentiveMsg),this.pubsub.publish("_BIND_OLAY", {cmpId:"vi-inc-cpn-msg",trigger:"couponshowmehow"})))}if(a.bmlPromotionMsg||a.ebayIncentivesMsg||a.ebayBucksMsg||a.nectarMainMsg)this.showIncentivesDiv(),$(document).trigger("vi_modules_loaded",["vi_loy",!0]);this.pubsub.publish("_INCENTIVES_RETURNED");this.attachIncentivesClickEvents()}},paintHtml:function(a,b){$("#"+b).html(a)},showIncentivesDiv:function(){$("#"+this.conf.incentiveDiv).show()},attachIncentivesClickEvents:function(){var a=this;$("#downArrow").click(function(){a.toggleRewardsDetailsDiv()}); $("#upArrow").click(function(){a.toggleRewardsDetailsDiv()});$("#rwrdMoreLnk").click(function(){a.toggleRewardsDetailsDiv()})},toggleRewardsDetailsDiv:function(){$("#textDiv").toggle();$("#detailsDiv").toggle()}}});raptor.defineModule("com.ebay.raptor.vi.SMEUtil",function(){return{init:function(a){this.conf=a},processResponse:function(a,b){if(b){var c=raptor.require("com.ebay.raptor.vi.AjaxUtil");c&&(this.loadCss(b,c),this.loadHtml(b),this.loadScript(b,c),$(window).trigger("resize"),$(document).trigger("vi_modules_loaded",["vi_sme",!0]))}},loadHtml:function(a){var b=this.conf;a.nodes&&0",{rel:"stylesheet",type:"text/css",href:d.href}).appendTo("head")}},loadScript:function(a,b){if(a.scripts&&0$.browser.version&&$("#"+a.drpdwnLayerId).css({position:"relative",visibility:"hidden"});if(!this.useVariant){$("#"+a.drpdwnLayerId).css("width","auto");var b=$("#"+a.drpdwnLayerId).width();ba.drpdwnMaxWidth&&(b=a.drpdwnMaxWidth);$("#"+a.drpdwnLayerId).width(parseInt(b));$("#"+a.atnId).css({"max-width":parseInt(b)-2,"white-space":"normal"})}$.browser.msie&&8>$.browser.version&&$("#"+a.drpdwnLayerId).css({position:"absolute",visibility:""})}, hideLayer:function(){var a=this.conf;this.openDropDown&&($("#"+a.drpdwnLayerId).hide(),this.openDropDown=!1)},handleDropdownClick:function(a){var b=this.conf,c=a.target||a.srcElement;if(!(this.useVariant&&c.parentNode.getAttribute("id")==b.atnId)){if("javascript:;"===c.href){var d=c.getAttribute("ds");if(d&&"true"!==d||!d)this.listElemId=c.id,c.getAttribute("i")==b.watchListId?this.addToWatch():this.addToList()}this.toggleDropDown(a)}},addToWatch:function(a,b){var c=this.conf;this.pubsub.publish("HIDE_DROPDOWN", {});this.pubsub.publish(this.msgs("VALIDATE_MSKU_VARIATIONS"),{});this.pubsub.publish("ADD_TO_WATCH_TRIGGERED",{});var d="";if(a)d=this.variationId?b+"&var="+this.variationId+"&entityInfo="+this.variationId+"%5EVARIATION":b;else var d=this.variationId?c.addToWatchUrl+"&var="+this.variationId+"&entityInfo="+this.variationId+"%5EVARIATION":c.addToWatchUrl,e=$("#"+this.listElemId),d=d+"&tagId="+e.attr("i")+"&etn="+e.attr("n");if(!c.msku||c.msku&&this.variationId)c.isUserSignedIn?(this.isWatchRequest= !0,this.sendRequest(d,c.isNewRaptorCmd),this.pubsub.publish(this.msgs("VARIATION_EDIT_WATCH_STATUS"),{variationId:this.variationId,variationWatched:!0}),this.setWatchersContent(1,parseInt($(this.conf.watchersElmSelector+" .vi-buybox-watchcount").html())||0)):top.location.href=d;c.msku&&!this.variationId&&this.pubsub.publish("LKDHDR_MOVETO_TOP",{ts:(new Date).getTime()});$("#atl_btn > a").focus()},addToList:function(){var a=this.conf,b="&_trsksid=";this.pubsub.publish(this.msgs("VALIDATE_MSKU_VARIATIONS"), {});var c=$("#"+this.listElemId);c.attr("t")&&"wish"==c.attr("t")?(this.isWishRequest=!0,b+=a.wishListTrackingParam):b+=a.otherListTrackingParam;var d=this.variationId?a.myEbayBaseUrl+"&var="+this.variationId+"&entityInfo="+this.variationId+"%5EVARIATION":a.myEbayBaseUrl;a.wishListCSRFToken&&(d+="&srt="+a.wishListCSRFToken);d=d+"&tagId="+c.attr("i")+"&etn="+c.attr("n")+b;if(!a.msku||a.msku&&this.variationId)a.isUserSignedIn?(this.updateVariationMap(c.attr("i"),!1),this.sendRequest(d)):top.location.href= d;$("#atl_btn > a").focus()},removeFromList:function(a){var b=this.conf;this.ListIsWatch=!1;var c=a.watchOnly?this.getRemoveFromWatchUrl(a.listDetails):this.getRemoveListURL(a.listDetails);c&&(a.watchOnly&&b.isDeleteWatchRaptorCmd?this.sendRequest(c,b.isDeleteWatchRaptorCmd,b.deleteAjaxCSRF):this.sendRequest(c),this.ListIsWatch&&($("#atl_btn > a").addClass("watch-show-overlay"),this.setWatchersContent(-1,parseInt($(this.conf.watchersElmSelector+" .vi-buybox-watchcount").html()))))},getRemoveFromWatchUrl:function(a){var b= this.conf,c="";this.ListIsWatch=!0;this.enableWatchList();b.msku&&(this.pubsub.publish(this.msgs("VARIATION_EDIT_WATCH_STATUS"),{variationId:this.variationId,variationWatched:!1}),c+="&variationIds="+b.itemId+"."+this.variationId);a&&a[0]&&this.updateVariationMap(a[0].listId,!0);return b.removeFromWatchBaseUrl+c},getRemoveListURL:function(a){var b=this.conf,c="",d=!1,e=!0;if(a){1c?$(this.conf.watchersElmSelector).html(""):isNaN(c)||$(this.conf.watchersElmSelector).html(d)},addToListResponseHandler:function(a){for(var b=this.conf,c=b.isUserSignedIn?!0:!1,d=[],e="",h=0;h ul > li >a[i="'+b.wishListId+'"]').parent(),e=b.myEbayOtherListBaseUrl+"&tagname="+f.listName+"&tagId="+f.listId,d.push({listId:f.listId,listName:f.listName,isWatchList:!1,isWishList:!0,listURL:e})):(this.disableEnableList(f.listId,!0,!1,b.statusMsgTxt.replace("$",this.limitCharText(a.listDetails[0].listName))),g=$("div#"+b.drpdwnListId+'> ul > li >a[i="'+f.listId+'"]').parent(),e=b.myEbayOtherListBaseUrl+ "&tagname="+f.listName+"&tagId="+f.listId,d.push({listId:f.listId,listName:f.listName,isWatchList:!1,isWishList:!1,listURL:e}));$($("#"+b.drpdwnListId+">ul").children()[0]).after(g)}this.pubsub.publish(this.msgs("LIST_ADD_SVC_ID"),{listDetails:d,isSignedIn:c});this.isWishRequest=!1},handleListMaxError:function(a,b){var c=this.conf,d="";this.isWishRequest?(d=$("div#"+c.drpdwnListId+'> ul > li >a[i="'+c.wishListId+'"]'),d.text(c.wishListFullTxt)):(d=$("div#"+c.drpdwnListId+'> ul > li >a[i="'+a.listId+ '"]'),b?(this.watchfull=!0,d.text(c.watchListFullTxt)):d.text(c.otherListFullTxt.replace("$",this.limitCharText(a.listName))))},disableWatchList:function(a){var b=this.conf;this.pubsub.publish(this.msgs("ADD_TO_WATCH_BTN"),{status:!0});this.disableEnableList(b.watchListId,!0,!0,a?b.watchListFullTxt:b.addedToWatchListTxt)},enableWatchList:function(a){this.disableEnableList(this.conf.watchListId,!1,!0,a);this.pubsub.publish(this.msgs("ADD_TO_WATCH_BTN"),{status:!1})},enableAllLists:function(){for(var a= $("#atl_drpdwnListId>ul").find("li>a"),b=0;b ul > li >a[i="'+a+'"]');if(b){if(c){this.isWatchDisabled=!0;b=e.atwAltCaption;e.isWatchHeartEnabled&&(b=''+e.atwAltCaption+''+b);var h=3==this.watchVariant?" wide-width":"",h=this.useVariant?' class="btn btn-ter'+h+'"':"";$("#"+e.atlBtnId).html('"+b+ "");try{$("#vi_oly_atwlstovly .clz").trigger("click")}catch(f){}}a.attr("ds","true");a.attr("class","ul-ds");d&&(this.showStatusMsg(d),c&&this.pubsub.publish("ADD_TO_WATCH_MSG_STATUS_TRIGGERED",{display:!0}))}else c&&(this.isWatchDisabled=!1,d=e.btnDefDispName,e.isWatchHeartEnabled&&(d=''+e.btnDefDispName+''+d),$("#"+e.atlBtnId+" > a").html(d)),a.removeAttr("ds","true"),a.removeClass("ul-ds"),$("#"+e.statusMsgId).hide(),c&&this.pubsub.publish("ADD_TO_WATCH_MSG_STATUS_TRIGGERED", {display:!1})},showStatusMsg:function(a){var b=this.conf;this.useVariant||($("#"+b.statusMsgContId).html(a),$("#"+b.statusMsgId).show())},showCreateNewOverlay:function(){var a=this,b=a.conf;a.pubsub.publish(a.msgs("VALIDATE_MSKU_VARIATIONS"),{});if((!b.msku||b.msku&&a.variationId)&&b.addnewOverlayId)a.pubsub.publish("_OPEN_OLAY",{cmpId:b.addnewOverlayId}),$("#"+b.addtoNewDivErrId).hide(),$("#"+b.addtoNewDefErrId).hide(),$("#"+b.addtoNewRespErrId).hide();a.toggleDropDown();$("html").bind("click",function(){a.closeAddNewOverlay()}); $("#"+b.addnewOverlayId).bind("click",function(a){a.stopPropagation()})},attachAddToNewListEvents:function(){var a=this,b=a.conf;$("#"+b.addtoNewBtnId).click(function(){a.createNewListRequest()});$("#"+b.cancelBtnId).click(function(){a.closeAddNewOverlay()});$("#"+b.addtoNewInputId).focus(function(){a.toggleAddToNewListInputTxt(!0)});$("#"+b.addtoNewInputId).blur(function(){a.toggleAddToNewListInputTxt(!1)})},createNewListRequest:function(){var a=this.conf,b="&_trsksid="+a.otherListTrackingParam, c=$("#"+a.addtoNewInputId);c.val()!=a.addtoNewInputTxt&&""!=$.trim(c.val())?(c=a.myEbayBaseUrl+"&tagName="+c.val(),this.variationId&&(c+="&var="+this.variationId+"&entityInfo="+this.variationId+"%5EVARIATION"),c+=b,a.wishListCSRFToken&&(c+="&srt="+a.wishListCSRFToken),this.sendRequest(c)):(c.val(a.addtoNewInputTxt),this.showDefCreatNewErr())},createNewListResponseHandler:function(a){for(var b=this.conf,c=b.isUserSignedIn?!0:!1,d=0,e=[],h="",f=0;ful").children()[0]).after("
  • "+i+"
  • ");d++;h=b.myEbayOtherListBaseUrl+"&tagname="+g.listName+"&tagId="+g.listId;e.push({listId:g.listId,listName:g.listName,isWatchList:!1,isWishList:!1,listURL:h})}}this.pubsub.publish(this.msgs("LIST_ADD_SVC_ID"), {listDetails:e,isSignedIn:c});b=1=c.maxListsAllowed&&($("#"+c.atnId).unbind("click"),$("#"+c.atnId).bind("click",function(a){b.toggleDropDown(a)}),$("#"+c.atnId+">a").attr("ds","true"),$("#"+c.atnId+">a").addClass("atnDs"))},errorMsg:function(a){var b=this.conf;$("#"+b.addtoNewDivErrId).show(); $("#"+b.addtoNewDefErrId).hide();if(a.topErrorMsg){var c=$("#"+b.addtoNewRespErrId);c.html(a.topErrorMsg);c.show()}a.bottomErrorMsg&&($("#"+b.addtoNewBtmErrId).html(a.bottomErrorMsg),$("#"+b.addtoNewBtmErrId).show())},showDefCreatNewErr:function(){var a=this.conf;$("#"+a.addtoNewDivErrId).show();$("#"+a.addtoNewDefErrId).show();$("#"+a.addtoNewRespErrId).hide();$("#"+a.addtoNewBtmErrId).hide()},toggleAddToNewListInputTxt:function(){var a=this.conf,b=$("#"+a.addtoNewInputId);b.val()==a.addtoNewInputTxt? b.val(""):""==b.val()&&b.val(a.addtoNewInputTxt)},limitCharText:function(a){var b=this.conf,c=b.charLimit;return a&&a.length>c?a.substring(0,c).concat(b.ellipses):a},closeAddNewOverlay:function(){var a=this,b=a.conf;$("#"+b.addtoNewInputId).val(b.addtoNewInputTxt);$("html").unbind("click",function(){a.closeAddNewOverlay()});a.pubsub.publish("_CLOSE_OLAY",{cmpId:b.addnewOverlayId});$("#atl_btn > a").focus()}}});raptor.defineClass("ebay.viewItem.AddToWatchLink",function(){return{init:function(a){var b=this;b.conf=a;b.pubsub=raptor.require("pubsub");b.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");b.msgs=raptor.require("com.ebay.raptor.vi.MsgHandler");b.pubsub&&b.pubsub.subscribe(b.msgs("ADD_TO_WATCH_BTN"),function(a){b.toggleWatchLink(a.status)},b);b.attachClickEvent()},toggleWatchLink:function(a){var b=this.conf;a?$("#"+b.linkTopId).css("display","none"):$("#"+b.linkTopId).css("display","inline")}, attachClickEvent:function(){var a=this;$("#"+a.conf.linkTopId).click(function(){a.makeWatchRequest();return!1})},makeWatchRequest:function(){var a=this.conf;!a.userSignedIn&&a.ended&&(top.location.href=a.addToWatchUrl);this.pubsub.publish(this.msgs("ADD_TO_WATCH_LNK"),{status:!0,addRequest:!0,watchLink:a.addToWatchUrl})}}});raptor.defineClass("raptor.vi.BestOffer",function(){return{init:function(a){var b=this;b.cfg=a;b.pubsub=raptor.require("pubsub");b.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");b.msgs=raptor.require("com.ebay.raptor.vi.MsgHandler");b.pubsub&&(b.pubsub.subscribe(b.msgs("BEST_OFFER_SVC_ID"),function(a){b.show(a)},this),b.pubsub.subscribe(b.msgs("REVIEW_OFFER_SVC_ID"),function(){b.openOly(a.mngQkBoUrl)},this),b.pubsub.channel(a.boOlyId).subscribe("_OLY_CLS_SVC",function(){b.onClose()},b));a.boOnLoad&& $(document).ready(function(){b.openOly(a.mkQkBoUrl)})},openOly:function(a){this.pubsub.publish("_OPEN_OLAY",{cmpId:this.cfg.boOlyId});this.buildUrl(a)},show:function(a){var b=this.cfg;this.msg=a;if(b.mkQkBoSiUrl)return this.reloadParent(b.mkQkBoSiUrl),!1;this.pubsub.publish("_OPEN_OLAY",{cmpId:b.boOlyId});this.buildUrl("t"==b.isRO?b.mngQkBoUrl:b.mkQkBoUrl)},buildUrl:function(a){var b=this.cfg,c;"undefined"!==typeof this.msg&&(c=""!==this.msg.vQty?this.msg.vQty:"");""!==c&&(a+="&quantity="+c);b.pgVal&& (a+="&pgv="+b.pgVal);this.request(a)},request:function(a){this.ajaxUtil.getJSON(a,this.response,this)},response:function(a){var b=this.cfg;if(a){if("REDIRECT"==a.status)return this.reloadParent(a.redirectUrl),!1;"SUCCESS"==a.status&&(a.cssUrls&&""!==a.cssUrls[0]?this.loadCss(a,b,this.handleJs):this.handleJs(a))}},loadCss:function(a,b,c){var d=this,b=$("#"+b.boTrbrId),e=document.createElement("link");e.type="text/css";e.rel="stylesheet";e.href=a.cssUrls[0];document.getElementsByTagName("head")[0].appendChild(e); $.browser.msie&&8>=parseInt($.browser.version,10)&&b.addClass("js").removeClass("js");b=document.createElement("img");b.onerror=function(){c&&c(a,d)};b.src=a.cssUrls[0]},handleJs:function(a,b){var c;a.js&&""!==a.js&&(c=document.createElement("script"),c.type="text/javascript",c.text=a.js,document.getElementsByTagName("head")[0].appendChild(c));b.handleBOResponse(a)},reloadParent:function(a){var b;"undefined"!==typeof this.msg&&(b=""!==this.msg.vQty?this.msg.vQty:"");"undefined"!==typeof b&&""!==b&& (a+="%26quantity="+b);top.location.href=a},handleBOResponse:function(a){var b=this.cfg,c=$("#"+b.boTrbrId),d=$("#"+b.boCntId);a.html&&""!==a.html&&d&&(c.hide(),d.html(a.html),this.pubsub.publish("_OPEN_OLAY",{cmpId:b.boOlyId}));handleBOLyrResponse(a)},onClose:function(){var a=window.location.href,a=a.replace(/&*boolp=1/,""),a=a.replace(/&*autorefresh=true/,""),a=a+(-1!=a.indexOf("?")?"&autorefresh=true":"?autorefresh=true");top.location=a}}});raptor.defineClass("com.ebay.raptor.vi.bid.BidLayer",function(){return{init:function(a){var b=raptor.require("pubsub");b&&(b.subscribe(a.svcId,function(c){if(c&&!c.isRedirect&&(c=this.getChild(a.overlayId))){c.show();try{$("#"+a.overlayId).parent().css("marginTop","-50px"),$("#"+a.overlayId).parent().parent().siblings(".clz").css("marginTop","-15px")}catch(b){}}},this),a.openOnLoad&&$(document).ready(function(){b.publish(a.invokeClkId,{})}))}}});raptor.defineClass("com.ebay.raptor.vi.bid.BidUtil",function(){var c=function(){};c.getItemData=function(a){var b;a&&(a[0]&&a[0].ViewItemLiteResponse&&a[0].ViewItemLiteResponse.Item&&a[0].ViewItemLiteResponse.Item[0])&&(b=a[0].ViewItemLiteResponse.Item[0],b.isAutoRefresh=!0);return b};c.timeLeftV=function(a){var b;a&&(b=function(a){var b=0;a&&(b=parseInt(a),b=isNaN(b)?0:b);return b},b={day:b(a.DaysLeft),hour:b(a.HoursLeft),minute:b(a.MinutesLeft),second:b(a.SecondsLeft)});return b};c.timeLeftFormat= function(a,b,h,d){var f="",g,e,i;if(a){g=a.day;e=a.hour;i=a.minute;a=a.second;if(0=e||h)&&$("#"+b.cssElemId).addClass(b.css);return f}};c.appendTime=function(a,b,h,d,c){h=h?" ":"";return(a||0===a&&c)&&!isNaN(a)&&(!c&&0")[0].src=this})};return c});raptor.defineClass("com.ebay.raptor.vi.bid.Bid",function(){return{init:function(a){var b=this;b.pubsub=raptor.require("pubsub");b.util=raptor.require("com.ebay.raptor.vi.bid.Util");b.bidUtil=raptor.require("com.ebay.raptor.vi.bid.BidUtil");b.bidTimeLeft={};b.cfg=a;b.cfg.isGsp=!1;b.isBidTextDirty=!1;b.pubsub&&(b.pubsub.subscribe(a.svcId,function(a){b.bidClick(a)},b),b.pubsub.subscribe(a.counterSvcId,function(a){b.timeCounter(a)},b),b.pubsub.subscribe(a.autoRefreshSvcId,function(a){b.autoRefresh(a)}, b))},timeCounter:function(){var a;this.bidUtil&&(this.overlay&&this.overlay.showing)&&(a=this.bidUtil.decrementOneSec(this.getBidTimeLeft()),this.updateTimeLeft(a,!0))},startCounter:function(a,b,d){var c=this.cfg,b={TimeLeft:a,AccessedDate:b,ViewerItemRelation:d,DetailLevel:c.detailLevel};this.setBidTimeLeft(a);this.pubsub&&this.pubsub.publish(c.counterStartSvcId,b)},autoRefresh:function(a){a&&(this.overlay&&this.overlay.showing)&&this.processResponse(a)},bidVars:function(){var a=this.cfg;this.ajaxUtil= raptor.require("com.ebay.raptor.vi.AjaxUtil");this.BidStatus=raptor.require("com.ebay.raptor.vi.bid.enums.BidStatus");this.BidError=raptor.require("com.ebay.raptor.vi.bid.enums.BidError");this.BidderStatus=raptor.require("com.ebay.raptor.vi.bid.enums.BidderStatus");this.button=this.getChild(a.bidBtnId);this.statusMsg=this.getChild(a.statusMsgId);this.overlay=this.getParent(a.overlayId)},toggleBidEvt:function(a,b){var d=this,c=d.cfg,e=c.enterBidId+c.value,f,g;b?(d.util.enablDisableBtn(d.button,!0), $("#"+c.bidBtnId+c.btn).unbind("click.Bid"),$("#"+e).unbind("keypress.Bid"),d.isBidTextDirty=!1):(f=function(){d.triggerCall(a,e)},g=function(b){d.util.isEnterKey(b)&&d.triggerCall(a,e)},d.util.enablDisableBtn(d.button,!1),$("#"+c.bidBtnId+c.btn).bind("click.Bid",f),$("#"+e).bind("keypress.Bid",g))},subscribeOlyClose:function(){var a=this,b=a.cfg;if(a.overlay){var d=a.overlay.conf;d&&d.closeSvcId&&(a.olyCloseHandle=a.pubsub.channel(b.overlayId).subscribe(d.closeSvcId,function(){a.layerCleanUp(b.isRefreshOnClose, b.refreshUrl)},a))}},updateCurrBid:function(a,b,d){var c=this.cfg;a&&(this.util.displayContent(c.curBidId,a.MoneyStandard,c.value,c.wrapper),d&&$("#"+c.curBidId+c.lable).html(d));this.updateApprox(b,c.curBidId)},updateApprox:function(a,b){var d=this.cfg,c;a&&(a.MoneyStandard&&b)&&(c=$("#"+d.approxTxt).html().replace(d.dummy,a.MoneyStandard),$("#"+b+d.approx).html(c).show())},setBidTimeLeft:function(a){self.bidTimeLeft=a},getBidTimeLeft:function(){return self.bidTimeLeft},updateCurrency:function(a){var b= this.cfg;a&&$("#"+b.enterBidId+b.currencyId).html(a)},closeLayer:function(){this.overlay&&this.overlay.hide()},bidClick:function(){},triggerCall:function(){},processResponse:function(){},updateTimeLeft:function(){},layerCleanUp:function(){},removeMaxBidParam:function(a){if(a){var b=a.indexOf("?maxbid"),d=a.indexOf("&maxbid"),c=a.lastIndexOf("&");if(-1!==b)return c=a.substr(b+1),c=c.indexOf("&")+1,0===c?a.substr(0,b):a.substr(0,b+1)+a.substr(b+c+1,a.length);if(-1!==d){if(d==c)return a.substr(0,d); c=a.substr(d+1);c=c.indexOf("&")+1;return a.substr(0,d)+a.substr(d+c,a.length)}}return a}}});raptor.defineClass("com.ebay.raptor.vi.bid.Counter",function(){return{init:function(b){var a=this,c;a.cfg=b;a.viewerItemRelationMap={NONE:0,OUTBIDDER:5,HIGHBIDDER:2};a.autoRefreshTime=0;a.pubsub=raptor.require("pubsub");a.bidUtil=raptor.require("com.ebay.raptor.vi.bid.BidUtil");a.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");a.accessedDate=b.accessedDate;a.viewerItemRelation=b.viewerItemRelation;a.detailLevel=b.detailLevel;a.secondsLeft=0;a.pubsub.subscribe(b.timerSvcId,function(b){a.triggerAutoRefresh(b)}, a);a.pubsub.subscribe(b.counterStartSvcId,function(b){a.callStart(b)},a);a.pubsub.subscribe(b.counterStopSvcId,function(){a.stop()},a);a.pubsub.subscribe("_DESTROY_BID_TIMER",function(){a.stop()});if((0=b&&this.stop()},triggerCounterSvc:function(){this.pubsub.publish(this.cfg.counterSvcId,{})},isStartCounter:function(b){var a=this.cfg;return 0!==b&&(b<=60*a.counterStartFromInMins||a.enableAFAlways)?!0:!1},isAutoRefresh:function(b){var a=this.cfg,c,g,d,h,f,e;if(a.autoRefreshEnabled){if(0===b)return this.triggerCounterSvc(),!0;if(a.enableAFAlways){if(this.calCIntvl&&(e=Math.ceil(b/60),this.accInt=Math.round(Number(Math.pow(e, a.afIntervalPower))*a.afIntervalFraction),this.accIntd&&bd&&this.autoRefreshTime===a||b<=d&&this.autoRefreshTime>= h)return!0}return!1},triggerAutoRefresh:function(b){var a=this.cfg.autoRefreshURL;a&&!this.busy&&(this.busy=!0,a+=-1!==a.indexOf("?")?"&":"?",b&&b.sse?(this.sse=!0,a+=$.param({lastaccessed:this.accessedDate||"",lvr:this.viewerItemRelation,dl:this.detailLevel,sse:b.sse})):a+=$.param({lastaccessed:this.accessedDate||"",lvr:this.viewerItemRelation,dl:this.detailLevel}),this.triggerCall(a),this.autoRefreshTime=0,this.calCIntvl=!0)},triggerCall:function(b){this.ajaxUtil.getJSON(b,this.autoRefresh,this, this.alwaysCallback)},alwaysCallback:function(){this.busy=!1},autoRefresh:function(b){var a=this.cfg;response=this.bidUtil.getItemData(b);this.busy=!1;response&&this.pubsub&&(response.fastDurationInMins=a.fastDurationInMins,this.sse&&(response.sse=!0,this.sse=!1),this.pubsub.publish(a.autoRefreshSvcId,response))},getSecondsLeft:function(){return this.secondsLeft},setSecondsLeft:function(b){return this.secondsLeft=0>b?0:b},isSSEActive:function(){return 3==this.sseVal&&this.sseOpen?!0:!1},resetSSE:function(){this.busy= this.sseOpen=!1},isSSEEnabledInBrowser:function(){return"undefined"!==typeof EventSource?!0:!1}}});raptor.defineClass("com.ebay.raptor.vi.bid.Util",function(){var c=function(){};c.updateStatusMsg=function(a,b){if(-1!==a&&b)switch(a){case 0:b.error();break;case 1:b.notice();break;case 2:b.warning();break;case 3:b.confirm()}};c.enablDisableBtn=function(a,b){a&&(b?a.disable():a.enable())};c.displayContent=function(a,b,d,c){a&&b&&($("#"+a+d).html(b),$("#"+a+c).show())};c.rmvEvt=function(a){if(a)for(var b=0,c=a.length;bthis.bidUtil.convertToSeconds(b)?$("#"+f.updateId+f.btn).css({visibility:"hidden"}):$("#"+f.updateId+f.btn).css({visibility:"visible"})},activeItemStatus:function(a,b,c,e){var d=this.cfg, f,g=-1,i;a===this.BidderStatus.HIGHBIDDER&&!b?(f=d.HIGHBIDDER_STATUS,g=3,i=d.successClz):a===this.BidderStatus.HIGHBIDDER&&b&&c?(f=d.HIGHBIDDER_STATUS,g=3,i=d.successClz):a===this.BidderStatus.HIGHBIDDER&&b&&!c?(f=d.HIGHBIDDER_RESERVE_NOT_MET_STATUS,g=1):a===this.BidderStatus.OUTBIDDER&&(f=d.OUTBIDDER_STATUS,g=2,i=d.warningClz);if(!this.prevBidderStatus||this.prevBidderStatus&&e)i=null;this.showStatus(f,g,i);this.prevBidderStatus=a},updateBidAmtError:function(a){var b=this.cfg,c,e=b.errorClz;a=== this.BidError.LOW_BIDAMOUNT?c=b.MIN_BID_ERROR_STATUS:a===this.BidError.OFFER_AMOUNT_ZERO?c=b.MIN_BID_ERROR_STATUS:a===this.BidError.INVALID_BIDAMOUNT_OF_HIGH_BIDDER?c=b.HIGH_BID_ERROR_STATUS:a===this.BidError.INVALID_BIDAMOUNT&&(c=b.MAKE_BID_ERROR_STATUS);this.showStatus(c,0,e)},showStatus:function(a,b,c){var e=this.cfg;a&&-1!==b&&(this.util.updateStatusMsg(b,this.statusMsg),this.util.displayContent(e.statusMsgId,$("#"+a).html(),e.value,e.wrapper),this.showFlash(b,c))},showFlash:function(a,b){var c= this.cfg,e=c.statusMsgId+c.value;b&&($("#"+e).addClass(b),setTimeout(function(){$("#"+e).removeClass(b)},1E3))},updateTimeLeft:function(a){var b=this.cfg,c,e,d,f="";a&&(c=a.day,e=a.hour,d=a.minute,a=a.second,dayTxt=1===c?b.dayTxt:b.daysTxt,hourTxt=1===e?b.hourTxt:b.hoursTxt,minuteTxt=1===d?b.minuteTxt:b.minutesTxt,secondTxt=1===a?b.secondTxt:b.secondsTxt,0=parseInt($.browser.version,10)&&b.addClass("js").removeClass("js");b=document.createElement("img");b.onerror=function(){c&&c(a,d)};b.src=a.cssUrls[0]},handleJs:function(a,b){var c;a.js&&""!==a.js&&(c=document.createElement("script"),c.type="text/javascript", c.text=a.js,document.getElementsByTagName("head")[0].appendChild(c));b.handleBINResponse(a)},reloadParent:function(a){var b=this.cfg,c;"undefined"!==typeof this.msg?(c=""!==this.msg.vQty?this.msg.vQty:"",b=""!==this.msg.vId?this.msg.vId:""):(c="undefined"!==typeof b.selQty&&""!==b.selQty?b.selQty:"",b="undefined"!==typeof b.selVarId&&""!==b.selVarId?b.selVarId:"");a+=""!==c?"%26quantity="+c:"%26quantity=1";""!==b&&(a+="%26var="+b);top.location.href=a},handleBINResponse:function(a){var b=this.cfg, c=$("#"+b.binTrbrId),d=$("#"+b.binCntId);a.html&&""!==a.html&&d&&(c.hide(),d.html(a.html),this.pubsub.publish("_OPEN_OLAY",{cmpId:b.binOlyId}));handleBinLyrResponse(a)},onClose:function(){var a=window.location.href,a=a.replace(/&*biolp=1/,"");-1!=a.indexOf("&iqrsp=1")&&(a=a.replace(/&*iqrsp=1/,""));a=a.replace(/&*autorefresh=true/,"");a+=-1!=a.indexOf("?")?"&autorefresh=true":"?autorefresh=true";top.location=a}}});raptor.defineClass("com.ebay.raptor.vi.bid.placebid.Emailtheseller",function(){return{init:function(a){var b=this;b.conf=a;b.YMMServiceCallURL=a.YMMServiceCallURL;b.ELFDataSubmitURL=a.ELFDataSubmitURL;b.isFsbo=a.isFsbo;b.isSignedIn=a.isSignedIn;b.ELFUserId=a.ELFUserId;b.ELFSellerId=a.ELFSellerId;b.itemNumber=a.itemNumber;b.timeLeft=a.timeLeft;b.saleEndTime=a.saleEndTime;b.saleEndTimeString=a.saleEndTimeString;b.sellerPhoneNum=a.sellerPhoneNum;b.handlrBinded=!1;$("#slrCntctNum").text(function(){var a= b.sellerPhoneNum[0],a=a.replace(/[^0-9]/g,"");return a.replace(/(\d{3})(\d{3})(\d{4})/,"$1 $2 $3")});$("#emailBtn_btn").bind("click",function(d){var c=$(".elf-form");d.preventDefault();if(d=b.getChild(a.overlayId))c.removeClass("error"),c.find(".notification").addClass("hidenotif"),c.find(":text").val(""),c.find(":checked").removeAttr("checked"),c.find("textarea").val("Enter your question here..."),c.find("#valueRem").text(1E3),d.show(),$("#elf-form-send").attr("tabindex","16"),b.buildTime(),b.FillinDetails(), $("#YMM")&&$("#YMM").hide();b.handlrBinded||b.bindHandlr()})},bindHandlr:function(){this.handlrBinded=!0;this.bindTriggerEvents()},YMMResponse:function(a){var b=this;$.getJSON(a+"&cb=?",function(a){"SUCCESS"===a.status.name&&"null"!=a.data&&(a=a.data,a[0].Make&&(b.reviseMake(),$.each(a[0].Make,function(b,a){$("#slctMake").append($("").attr("value",a).text(a))}),b.reviseModel()),a[0].Model&&(b.reviseModel(),$.each(a[0].Model,function(b,a){$("#slctModel").append($("").attr("value", a).text(a))})))})},buildUrlForYMM:function(a){var b=this.YMMServiceCallURL,b=b.replace(/&/g,"&");this.YMMResponse(b+("&"+a),"Year")},reviseMake:function(){$("#slctMake").empty();var a=new Option("option text","value");$(a).html("Any");$("#slctMake").append(a)},reviseModel:function(){$("#slctModel").empty();var a=new Option("option text","value");$(a).html("Any");$("#slctModel").append(a)},refreshCaptcha:function(){$.ajax({type:"GET",url:"Motors/ELF/RefreshCaptcha",dataType:"json",success:function(a){a= jQuery.parseJSON(a);a.imageURL&&$("#captchaImageURL").attr("src",a.imageURL)}})},saveELFData:function(a){var b=this;b.showThrobber();var d=b.itemNumber,c=null,e=null,g=null;b.isSignedIn?((c=b.ELFDataSubmitURL)&&0!=c.length&&(c=c.replace(/&/g,"&")),c+="itemNumber="+d+"&"+a):c="itemNumber="+d+"&"+a;c&&0!=c.length&&(c=c.replace(/ /g,"+"));var c=c+"&Ajax=true",f=!0;b.isSignedIn?(e=c+"&callback=?",c="",g="jsonp",f=!0):null!=document.getElementById("captchaImageURL")&&(c+="&captchaImageURL="+$("#captchaImageURL").attr("src"), e="Motors/ELF/SubmitData",g="json",f=!1);$.ajax({type:"GET",url:e,data:c,dataType:g,success:function(a){f?"null"!=a.success&&b.postResponseSuccess():(a=jQuery.parseJSON(a),"null"!=a.success&&a.success&&b.postResponseSuccess(),"null"!=a.imageUrl&&b.postResponseCaptchaRefresh(a))}}).error(function(){b.closeOverlay();b.showErrorOnCloseOverlay()})},postResponseSuccess:function(){this.closeOverlay();for(var a={},b=location.search.substring(1),d=/([^&=]+)=([^&]*)/g,c;c=d.exec(b);)a[decodeURIComponent(c[1])]= decodeURIComponent(c[2]);a.confirmvalue="1";a.EmbeddedLeadForm="confirm";location.search=$.param(a)},postResponseCaptchaRefresh:function(a){$("#throbber_elf").hide();$(".elf-form").show();$("#captchastring").val("");$("#captchaImageURL").attr("src",a.imageURL);$(this).parent("div").addClass("error");$("#captchaerror2").css("display","block")},closeOverlay:function(){this.pubsub.publish("_CLOSE_OLAY",{cmpId:this.conf.overlayId});$(".elf-form-wrapper").find(".form_price span").remove()},showThrobber:function(){$(".elf-form").hide(); $("#throbber_elf").show()},showErrorOnCloseOverlay:function(){for(var a={},b=location.search.substring(1),d=/([^&=]+)=([^&]*)/g,c;c=d.exec(b);)a[decodeURIComponent(c[1])]=decodeURIComponent(c[2]);a.confirmvalue="0";a.EmbeddedLeadForm="confirm";location.search=$.param(a)},buildTime:function(){var a=this.timeLeft,b=Math.floor(a/86400),d=Math.floor(a%86400/3600),c=Math.floor(a%86400%3600/60),a=a%86400%3600%60,e=null,g=null,f=null,h=null,i=null,g=(10>b&&0!=b?"0"+b:b)+"d ",f=(10>d&&0!=d?"0"+d:d)+"h ", h=(10>c&&0!=c?"0"+c:c)+"m ",i=(10>a&&0!=a?"0"+a:a)+"s ";0a?this.value=this.value.substring(0,1E3):$("#valueRem").text(a)});$("#firstNameId,#lastNameId,#emailAddressId").keyup(function(){0>63-$(this).val().length&&(this.value=this.value.substring(0,63))});$(".imp").focusin(function(){$(this).parent("div").hasClass("error")&&($(this).parent("div").removeClass("error"), $(this).next(".notification").addClass("hidenotif"))});$("#slctMake").change(function(){var b=$("#slctMake")[0],b=b.options[b.selectedIndex].text;"Any"!=b?$("#slctModel").prop("disabled",!1):$("#slctModel").prop("disabled",!0);b="&sfp=Make:"+b+"&rf=Model";a.buildUrlForYMM(b)});$("#refreshCaptcha").click(function(){a.refreshCaptcha()})}}});raptor.defineClass("ebay.viewItem.Cart",function(){var c=!1;return{init:function(a){this.pubsub=raptor.require("pubsub");this.conf=a;this.olayCloseSvcId="_OLY_CLS_SVC";this.actionPanel=raptor.require("raptor.vi.ActionPanel");this.cookie=raptor.require("ebay.cookies");this.pubsub=raptor.require("pubsub");this.msgs=raptor.require("com.ebay.raptor.vi.MsgHandler");this.registerPubSubEvents(a);this.attachBtnClickEvent();this.attachMsgHandler()},registerPubSubEvents:function(a){this.pubsub.subscribe(this.msgs("HIDE_ADD_TO_CART_LINK"), function(b){this.hideAddToCartLink(a,b.toHide)},this);this.pubsub.publish(this.msgs("VALIDATE_CART_MODULE_READY"),{});this.pubsub.subscribe("TRIGGER_CART_BTN",function(){$("#"+a.cartBtnId).trigger("click")},this);this.pubsub.subscribe(this.msgs("AUTO_REFRESH_DISABLE_BTN_SVC"),function(){c=!0;this.pubsub.publish("_VI_BTN_MSGS",{id:a.cartBtnId,isDisable:!0})},this)},hideAddToCartLink:function(a,b){b?($("#"+a.cartBtnId).show(),$("#"+a.cartBtnId).parent().show(),a.isATCRedesignLayerV1Active&&($("#"+a.cartBtnId).show(), $("#vi-viewInCartBtn").hide()),$("#atcLnk").hide()):($("#"+a.cartBtnId).hide(),$("#"+a.cartBtnId).parent().hide(),a.isATCRedesignLayerV1Active&&($("#"+a.cartBtnId).hide(),$("#vi-viewInCartBtn").show()),$("#atcLnk").show())},attachBtnClickEvent:function(){var a=this,b=a.conf,d={qtyBoxId:"qtyTextBox",submitURL:b.cartUrl,isValid:"isValid",isBulkCart:b.isBulkCart?!0:!1,hasWrtyIntercept:b.hasWrtyIntercept?!0:!1,itemId:b.itemId};b.isATCRedesignLayerV1Active&&$("#"+b.cartBtnId).click(function(e){var d={atcRedesignOlayId:b.atcRedesignOverlayId}; a.pubsub&&!c&&a.pubsub.publish("_TRG_CLK_ATCREDESIGN_BTN",d);e.preventDefault()});b.isATCRedesignLayerV1Active||$("#"+b.cartBtnId).click(function(b){a.pubsub&&!c&&a.pubsub.publish("_SUBMIT_CARTBTN",d);b.preventDefault()})},attachMsgHandler:function(){var a=this;a.pubsub.channel(a.conf.cartOlayId).subscribe(a.olayCloseSvcId,function(b){a.cartOverlayClose(b)},a)},cartOverlayClose:function(){var a=this.cookie.readCookie("dp1","pbf");this.cookie.writeCookielet("dp1","pbf",this.cookie.setBitFlag(a,66, 1))}}});raptor.defineModule("raptor.vi.Charity",function(){return{init:function(a){var b=this;b.conf=a;a.signedIn&&a.onload?$(window).load(function(){b.addToFavCall()}):a.signedIn&&a.lnkId&&$(window).load(function(){b.chckCharity()});$("#"+a.lnkId).bind("click",function(){b.addToFavCall()});$("#"+b.conf.addedCharityId).bind("click",function(){b.rmvToFavCall()})},chckCharity:function(){this.makeScriptCall(this.conf.svcURL+"srt="+this.conf.csrf)},addToFavCall:function(){this.makeScriptCall(this.conf.svcURL+ "setFavNpId="+this.conf.charityid+"&srt="+this.conf.csrf)},rmvToFavCall:function(){this.makeScriptCall(this.conf.svcURL+"setFavNpId="+this.conf.charityid+"&srt="+this.conf.csrf+"&action=remove")},processRes:function(a){a&&1==a.status&&(a=a.userFavNpIds?a.userFavNpIds.split(","):[],a=-1!=$.inArray(String(this.conf.charityid),a)?!0:!1,this.addRmvCharityDspl(a))},addRmvCharityDspl:function(a){a?($("#"+this.conf.lnkId).hide(),$("#"+this.conf.addedCharityId).show()):($("#"+this.conf.addedCharityId).hide(), $("#"+this.conf.lnkId).show())},makeScriptCall:function(a){var b=document.createElement("script");b.type="text/javascript";b.async=!0;b.src=a+"&cb=this.raptor.require('raptor.vi.Charity').processRes";document.getElementsByTagName("head")[0].appendChild(b)}}});raptor.defineClass("raptor.vi.CompareItems",function(){return{init:function(a){this.cfg=a;this.rmv=this.getRemovedItems();this.request(a.itm)},request:function(a){var b=this,a=location.href.split("itm")[0]+"itm/compare?item="+a+"&items=ALL";$.ajax({url:a,context:document.body}).done(function(a){a&&(b.populate(a),$("#cp_showMore").bind("click",function(){trackingUtil("VI_COMPARE_SHOW_MORE_DETAILS");b.showHide(!0)}),$("#cp_showLess").bind("click",function(){trackingUtil("VI_COMPARE_SHOW_LESS_DETAILS"); b.showHide(!1)}),$(".a_itemLink").bind("click",function(){trackingUtil("VI_COMPARE_ITEM_IMAGE_CLICK")}),$(".li_itemName a").bind("click",function(){trackingUtil("VI_COMPARE_ITEM_TITLE_CLICK")}),$(".cp_remove").bind("click",function(){trackingUtil("VI_COMPARE_REMOVE_ITEM");b.saveRemovedItem(this)}))})},populate:function(a){var b=this.cont=$("#div_compareContainer");$(b).html(a);this.cleanUpStorage();this.removeDeletedItems();this.showModule()},removeDeletedItems:function(){var a;if(null!==this.rmv){for(a= 0;a<=this.rmv.length;a++)$('.div_items[item="'+this.rmv[a]+'"]').remove();for(a=$(".div_items").not(".u-dspn").length;7>a;a++)$(".div_items.u-dspn").first().removeClass("u-dspn")}},showModule:function(){var a=$("#compareHeader");this.cfg.enableDelete&&$(".cp_remove.u-dspn").removeClass("u-dspn");$(this.cont).show();$(a).css("display","inline")},showHide:function(a){$(".ol_item_detail li").toggleClass("item_details_expand",a);$(".li_hide").toggle(a);$("#cp_showMore").toggle();$("#cp_showLess").toggle()}, removeItem:function(a){$(a).parents(".div_items").remove();$(".div_items.u-dspn").first().animate({opacity:"show"},1500).removeClass("u-dspn")},cleanUpStorage:function(){var a=[],b=$(".div_items").length;if(null!==this.rmv){for(var c=0;c<=b;c++)for(var d=0;d a > b").click(function(){b.dropdownClicked()});$("#"+a.mainId+"myGarageLink").click(function(){$(document).trigger("rover", {sid:"p2047675.l44447"})});0<$("#diagramLink").length&&this.addClickEvent("#diagramLink");"HSNTSN"==a.selectOverlayTypeToShow?($("#"+a.hsnAncId).click(function(){b.setHsnTsn()}),$("#"+a.mainId+"slctBtn").click(function(){b.htOlySelect()}),$("#"+a.mainId+"htCancel").click(function(){b.sltRowOlyCancel(b.conf.htOverlayOSId)})):($("#"+b.conf.mainId+"anc").click(function(){b.setMakesForStreetNames()}),$("#"+a.mainId+"sn-slctBtn").click(function(){b.snOlySelect(b.conf.mainId+"streetNameResponseOverlay")}), $("#"+a.mainId+"sn-Cancel").click(function(){b.sltRowOlyCancel(b.conf.mainId+"streetNameResponseOverlay")}));a.istecdoc&&$.ajax({type:"GET",dataType:"script",async:!1,url:a.tecdocAuthUrl+a.sellerid,success:function(b){"true"==b&&$("#copyrt").html(a.tecdocCr)}})}catch(d){}},setMakesForStreetNames:function(){$(document).trigger("rover",{sid:"p2047675.l7767"});var a=this.conf.vurl+"fitment/getdata?site="+this.conf.site+"&cat="+this.conf.categoryId,a=77==this.conf.site?a+"&pn=DEM_Make,DEM_StreetName": a+"&pn=UKM_Make,UKM_StreetName";this.makeCall(a,this.parseVServiceMakesResponse)},parseVServiceMakesResponse:function(a){var b=this;if("SUCCESS"===a.status.name)if(0 ":g+(""+c[i]+"");f.innerHTML=g;this.overlayRowCount=b;for(c=0;c")}catch(l){}k||(k=document.createElement("INPUT"),k.type="RADIO",k.id=this.conf.mainId+"pick"+c,k.name="vehpick",k.value=this.getChoosenVehicle(d,g,!0));j.appendChild(k)}else j=f.insertCell(i),j.innerHTML=g[d[i-1]]}this.pubsub.publish("_OPEN_OLAY",{cmpId:this.conf.mainId+"streetNameResponseOverlay"})}else this.showHide("dcthd ctVMTxt ctHTMTxt ctHTIFTxt ctVNMTxt dthr dctbl err".split(" "),!0),this.showHide(["ctHTNMTxt","ctshd"], !1)},getStreetNamesFromMake:function(a){var b=[],d=this.conf.makesStreenName;if(0=f;e--)g=new Option(e,e),b.options[c]=g,c++,this.preSelect(b,g);for(c=1;c=a)&&this.showHideWithID(["expCB","expCBLb"],!0,"");else{this.conf.myVehiclesOn=!1;this.showHide(["mvRow"],!0);this.showHide(["vehfltr"], !0);if(b=document.getElementById(this.conf.mainId+"htdiv"))b.className="",b.style.paddingLeft="12px";a&&(a[1].disabled=!1)}}else this.serviceErr(),this.showHide(["fltTxt"],!0)},getDropdownObject:function(a,b){var d=this.conf;this.iLen=this.eLen=0;if(a){this.showHide(["fltTxt"],!0);this.showHide(["topMsg","mvdd","or"],!1);a.E&&(this.eLen=a.E.length);a.I&&(this.iLen=a.I.length);var c=$("li[value=13]"),e=$("li[value=20]");$("li[value=11]").css("display","none");$(c).removeClass("op").addClass("opd hrl"); $(e).removeClass("op").addClass("opd");$(c).hover(function(){$(this).css("cursor","default");$(this).css("background-color","#fff")});$(e).hover(function(){$(this).css("cursor","default");$(this).css("background-color","#fff")});$("li[value=14]").removeClass("op").addClass("opd hrl ptblr");if(!d.isUserSignedIn||!a.E)$("li[value^=20]").css("display","none"),$(c).css("padding-top","10px"),$(c).removeClass("hrl");if(d.isUserSignedIn)for(c=0;c=i;i++)e.isNull(b[a][i])||(g+=b[a][i]+" ",f+=d[i-3]+":"+b[a][i]+"|");("100"==e.conf.site||"2"==e.conf.site)&&848!=e.conf.catalogId?(f+="null"==b[a][7]?"":"Submodel:"+b[a][7],f+="null"==b[a][6]?"":"|Trim:"+b[a][6]):f+="null"==b[a][7]?"":d[3]+":"+b[a][7];e.isNull(b[a][6])?e.isNull(b[a][7])||(g+=b[a][7]+" "):g+=b[a][6]+" ";e.isNull(b[a][8])||(f=("100"==e.conf.site||"2"==e.conf.site)&& 848!=e.conf.catalogId?f+("|Engine - Liter_Display:"+b[a][8]):f+("|"+d[4]+":"+b[a][8]));10>b[a].length?e.isNull(b[a][8])||(g+=b[a][8]+" "):("100"==e.conf.site||"2"==e.conf.site)&&848!=e.conf.catalogId&&!e.isNull(b[a][9])?(g+=b[a][9]+" ",f+="null"==b[a][9]?"":"|Engine:"+b[a][9]):e.isNull(b[a][8])||(g+=b[a][8]+" ")}else if(b[a][0]){i="77"==e.conf.site?1:0;for(i;i<=d.length;i++){var j=b[a]["77"==e.conf.site?i+2:i+3];e.isNull(j)||(f+=d[i]+":"+j+"|",g="--"==j?g+"[--]":g+j,!e.isNull(b[a][i+1])&&"undefined"!= b[a][i+1]&&(g+=" "))}}var f=encodeURIComponent(f),k=b[a][2],l=b[a][1];$(h).html(g);$(h).attr("u",f);"null"!=k&&"null"!=l&&($(h).attr("vt",k),$(h).attr("si",l),"0"==l&&$(h).attr("title",e.conf.dsContent));"1"==l&&k==e.vehicleType?($(h).bind("click",function(){$(document).trigger("rover",{sid:"p2047675.l10055"});e.makeSavedVehPageCall(f,g,c,k,l)}),e.addMyGarageTracking(),$(h).addClass("plr")):$(h).removeClass("op").addClass("opa")}else $(h).css("display","none")},makeSavedVehPageCall:function(a,b,d, c,e){var h=this.getUrl(!1,!0,this.CREQ);if("100"!=this.conf.site||void 0==this.conf.productId||null==this.conf.productId||""==this.conf.productId)h+="&pn="+this.getPropertyNames(this.propNames);h=h+"&page=1"+("&sfp="+a);h+="&_trksid="+this.conf.trksid;this.showAll=!1;this.recentValue=b;if(this.isSavedVehClkd=d)this.recVal=b,this.recSfp=a,this.vehtype=c,this.si=e;this.trgTopCompUpd=!0;this.makeCall(h,this.displayCompatibilityInfo);this.resetSrchFldFilters();this.chosen=this.getSelectedVehicle(a);this.updateVehicleChosen(this.chosen); this.showHide(["dctbl","err"],!0);this.showHide(["dthr"],!1)},resetSrchFldFilters:function(){var a=this.srchFlds;if(null!==a)for(var b=0;b"+this.chosen+"")},enableCompViewFitsYes:function(a){this.addCompatibilityViewStyling(a,this.fitsMessageDictionary.FITS_YES_MSG_TYPE);this.updateFitsMessage(a,this.fitsMessageDictionary.FITS_YES,!0);a.find("#fits-edit-btn").show()},enableCompViewFitsMaybe:function(a){this.addCompatibilityViewStyling(a,this.fitsMessageDictionary.FITS_MAYBE_MSG_TYPE);this.updateFitsMessage(a,this.fitsMessageDictionary.FITS_MAYBE, !0)},enableCompViewFitsWarning:function(a){this.addCompatibilityViewStyling(a,this.fitsMessageDictionary.FITS_NO_MSG_TYPE);this.updateFitsMessage(a,this.fitsMessageDictionary.FITS_NO,!0);a.find("#fits-edit-btn").show()},enableCompViewFitsError:function(a){this.addCompatibilityViewStyling(a,this.fitsMessageDictionary.FITS_TRY_AGAIN_MSG_TYPE);this.updateFitsMessage(a,this.fitsMessageDictionary.FITS_TRY_AGAIN,!1)},showHideEle:function(a,b){for(var d=0;db.length)$("#notesSp").html(b),$("#readMoreId").hide();else{var d=b.substring(0,40);$("#readNotesId").val(b);$("#notesSp").html(d).append("... ");$("#readMoreId").show()}}b= this.getFourthAttribute(a.data[0]);a=this.getFifthAttribute(a.data[0]);5<=this.fldsSel||b&&"undefined"==typeof a&&4<=this.fldsSel||"undefined"==typeof b&&3<=this.fldsSel?this.displayTopCompInfoExact():this.displayTopCompInfoMaybe()}else this.showHideEle(["topFitsNot","topSeeAll","topSeeIndent"],!1),this.showHideEle(["topFitsNeed","topFits","topFitsMost","topSeeMore","topCompNotes"],!0),$("#topCompNotes .l-dl").text("");else this.showHideEle(["topSeeAll"],!1),this.showHideEle("topFitsNeed topFits topFitsMost topSeeMore topCompNotes topFitsNot topSeeIndent".split(" "), !0)},_displayTopCompInfo:function(a){$fitsContentContainer=$("#fits-msg-content");this.resetComptabilityViewStyling($fitsContentContainer);if("SUCCESS"===a.status.name)if(a.data&&0/gi," "),$("#fitsMoreInfo").show(),$("#fits-msg-main").addClass("mrb10"),$("#fitsMoreInfoContent").append(""+this.fitsMessageDictionary.FITS_IMPORTANT+": "+b+""),void 0!==a.data[0].DiagramURL&&0'+this.fitsMessageDictionary.FITS_SEE_DIAGRAM+ ""),$("#diagramLink").data({href:a.data[0].DiagramURL[0],refno:a.data[0].DiagramURL[1],qty:a.data[0].DiagramURL[2]}),this.addClickEvent("#diagramLink")))}else this.enableCompViewFitsWarning($fitsContentContainer);else this.enableCompViewFitsError($fitsContentContainers)},displayTopCompInfoMaybe:function(){this.showHideEle(["topFitsMost","topSeeMore","topSeeIndent"],!1);this.showHideEle(["topFitsNeed","topFits","topFitsNot","topSeeAll","topCompNotes"],!0)},displayTopCompInfoExact:function(){this.showHideEle(["topFits", "topSeeAll","topSeeIndent"],!1);this.showHideEle(["topFitsNeed","topFitsMost","topFitsNot","topSeeMore"],!0)},getFourthAttribute:function(a){var b=void 0;"3"==this.conf.site&&a.Variant&&(b=a.Variant);"77"==this.conf.site||"71"==this.conf.site||"101"==this.conf.site||"186"==this.conf.site?a.Platform&&(b=a.Platform):a.Trim&&(b=a.Trim);return b},getFifthAttribute:function(a){var b=void 0;"3"==this.conf.site?a["Cars Type"]&&(b=a["Cars Type"]):"77"==this.conf.site||"71"==this.conf.site||"101"==this.conf.site|| "186"==this.conf.site?a.Type&&(b=a.Type):a.Engine&&(b=a.Engine);return b},updateVehicleMessage:function(a){var b=$("#topFits .l-dl");b.text(a);selector="#topFitsMost .l-dl";b=$(selector);b.text(a);selector="#topFitsNot .l-dl";b=$(selector);b.text(a)},displayCompatibilityInfo:function(a){if(this.isGoClicked||this.trgTopCompUpd)this.showTopCompMsg&&(this.trgTopCompUpd=!1,this.displayTopCompInfo(a)),this.showTopCompSection&&(this.trgTopCompUpd=!1,this._displayTopCompInfo(a)),this.triggerTopUpdate=this.isGoClicked= !1;this.endTime=(new Date).getTime();this.recentValue&&""!=this.recentValue&&($($("#"+this.conf.mainId+"ieveh .crtval").children()[1]).html(this.recentValue),this.isSavedVehClkd?this.setMyVehicleDropDown(!0,null,null):this.resetMyVehicleDD());12E3>this.endTime-this.startTime?"SUCCESS"===a.status.name?(a.displayNames&&0===this.dsplNames.length&&(this.dsplNames=a.displayNames),a.propertyNames&&(this.propNames=a.propertyNames),this.uniqueVehicle=100==this.conf.site?!0:a.uniqueVehicle,this.clearTable(this.conf.mainId+ "ctbl"),this.conf.myVehiclesOn&&(this.updateMyVeh&&($($("#"+this.conf.mainId+"ieveh .crtval").children()[1]).html(this.chosen),this.setMyVehicleDropDown(!1,this.sfArg,this.chosen),this.valFromURL=this.chosen,this.updateMyVeh=!1),this.chckFitsClicked&&(this.setMyVehicleDropDown(!1,null,null),this.chckFitsClicked=!1)),this.updateVehicleChosen(this.chosen),0 p > span.clr").append($("#"+d+"norecco"));$("#"+d+"cerr > p > span.clr").css({display:"inline",margin:"0"})},buildPagination:function(a){var b=this;tp=a.totalPageCount;cp=a.currentPageNo;b.updateCount(a.totalRecordCount);if(null!==tp&&null!==cp)if(1 div > span.pg-cs"),a=$("div#"+b.conf.pgnId+"> div > span.pg-m"),c=a.children().size(), e=0;e<=c;e++)$($($(a).children()[e]).children()[0]).unbind("click");if(10c){for(e=11;e<=tp;e++)$(''+e+"").insertBefore(".pg-cdr");c=$(a).children().size()}for(e=tp+1;ecp){for(var g=0;10>=g;g++)d=$(a).children()[g],$(d).css("display","");for(g=11;g<=tp;g++)d=$(a).children()[g],$(d).css("display","none")}if(1!=cp&&1==cp%10){for(var g=tp>=cp+9?cp+9:tp,i=cp;i<=g;i++)d=$(a).children()[i],$(d).css("display","");for(g=1;g=cp-9;g--)d=$(a).children()[g],$(d).css("display","");for(g=cp+1;g<=tp;g++)d=$(a).children()[g], $(d).css("display","none")}}1==cp?b.makeLeftArrDisabled(e,h):(b.makeLeftArrEnabled(e,h),$(h).bind("click",function(){b.makePageCall(cp-1,!1)}));cp!==tp?($(f).bind("click",function(){b.makePageCall(cp+1,!1)}),b.makeRightArrEnabled(c,f)):(b.makeRightArrDisabled(c,f),b.makeLeftArrEnabled(e,h));for(e=1;e<=tp;e++)d=$(a).children()[e],c=$(d).children()[0],$(d).removeClass("pg-cr").addClass("pg-nm"),c||($(d).html(""),$(d).append(''+e+"")),cp==e?($(d).removeClass("pg-nm").addClass("pg-cr"), $(c).css("color","#000"),$(c).css("text-decoration","none"),b.disableAnchor(c,!0)):($(c).css("color","#777777"),$(c).css("text-decoration","none"),b.enableAnchor(c,null,!0))}else $("#"+b.conf.pgnId).hide();if(null!==cp&&null!==tp&&2<=tp)for(a=cp+1;a<=tp;a++)b.setPaginationClick(a);if(null!==cp&&null!==tp&&2<=tp)for(a=1;a div > span.pg-cs");var d=$("div#"+b.conf.pgnId+"> div > span.pg-m"),d=$(d).children()[a];(d=$(d).children()[0])&&$(d).bind("click",function(){b.makePageCall(a,!1)})},updateCount:function(a){var b=this.conf.mainId;0>=this.conf.totCount&&(this.conf.totCount=a);$("#"+b+"ct").html(a); $("#"+b+"cttl").html(a)},updateOEMDiagram:function(a,b){!this.isNull(a)&&""!=a?($("#asmbl").html(a),$("#asmbl").css("font-weight","bold"),0<$("#arrDiv1").length||($("#asmbl").parent().parent().prepend('
    '),$("#arrDiv1").css("margin","0 15px 0 0")),$("#asmbl").parent().parent().show(),$("#asmblLyr").show()):($("#asmbl").parent().parent().hide(),$("#asmblLyr").hide());!this.isNull(b)&&""!=b&&0<1*b?($("#asmblQty").html(1*b),$("#asmblQty").css("font-weight","bold"), 0<$("#arrDiv2").length||($("#partQty").prepend('
    '),$("#arrDiv2").css("margin","0 15px 0 0")),$("#partQty").show(),$("#asmblLyr").show()):$("#partQty").hide()},drawTable:function(a,b,d){var c=this,e=b.length,h=document.getElementById(c.conf.mainId+"ctbl");h.className=100==c.conf.site?"fTbl":"fTblUK";$(h).off("click").on("click",function(a){if($(a.target).is(".fitment-moreless")){var a=$(a.target),b=a.prev("span"),d=a.data("id"),e="";try{e=$("#"+d).get(0).notes[0]}catch(f){}"MORE"=== a.data("mode")?(b.html(e),a.html(c.conf.less),a.data("mode","LESS"),a.attr("aria-expanded",!0),$(document).trigger("rover",{sid:"p2047675.l9601"})):(b.html(a.data("shortValue")),a.html(c.conf.more),a.data("mode","MORE"),a.attr("aria-expanded",!1),$(document).trigger("rover",{sid:"p2047675.l9602"}))}});for(var f=0;f",i.appendChild(k),k=document.createElement("SPAN"),k.innerHTML=c.conf.notesAlertMsg,k.className="ntsClr",i.appendChild(k))}else i.innerHTML=k;0===g&&(i.id="fTblFTd")}for(var m,j=0;j"),m.data({id:l.id,shortValue:n,mode:"MORE"}),m.attr("aria-expanded",!1),m.html(c.conf.more),i.appendChild(m.get(0)));l=$("#"+l.id);l.on("hover touchend",function(){$(document).trigger("rover",{sid:"p2047675.l1559"});event.preventDefault()});i.style.width="20%"}else i.innerHTML= " ",i.style.width="5%";else 100==c.conf.site&&"Parts Diagram"==a[g]?m&&null!==m[0]&&0 ',l.style.textDecoration="none",i.id="DIA"+j,i.oeUrl=m[0],i.refNo=m[1],i.qty=m[2],i.onclick=function(){$(document).trigger("rover",{sid:"p2047675.l4026"});c.showDiagram(this.oeUrl,this.id);c.updateOEMDiagram(this.refNo,this.qty)},i.appendChild(l),i.style.width="10%",i.style.textAlign="center",i.className="pDiaTd"): (i.innerHTML=" ",i.style.width="10%"):i.innerHTML=m?m:"All"}c.pubsub.publish("_CLOSE_OLAY",{cmpId:c.conf.olyId});h.onmouseleave=function(){c.pubsub.publish("_CLOSE_OLAY",{cmpId:c.conf.olyId})}},showDiagram:function(a,b){var d=this.getChild(this.conf.diaOvl),c=$("#ovlMainImg");this.pubsub.publish("_CLOSE_OLAY",{cmpId:this.conf.diaOvl});$("#mImg").find(".zoomIcon").remove();$("#mImg").find(".zoomImg").remove();d&&d.conf&&(c.hide(),this.buildDiagramImage(a),$("#ovlMainImg").parent().zoom({url:a}), d.conf.trigger=b,d.conf.noFixedPos=!0,d.show($("#"+d.conf.trigger)))},buildDiagramImage:function(a){var b=this,d=document.createElement("img"),c=$("#ovlMainImg"),e=$("#ovlThrImg");d.src=a;e.attr("src","//p.ebaystatic.com/aw/pics/globalAssets/imgLoading_30x30.gif");e.show();d.complete||4===d.readyState?(c.attr("src",a),b.findnSetImageSize(a),e.hide(),c.show()):d.onload=function(){c.attr("src",a);b.findnSetImageSize(a);e.hide();c.show()};d.onerror=function(){}},findnSetImageSize:function(a){var b=this, d,c=0,e=0;d=document.createElement("img");d.src=a;d.complete||4===d.readyState?(c=d.width,e=d.height,b.setImageSize(c,e)):d.onload=function(){c=d.width;e=d.height;b.setImageSize(c,e)}},setImageSize:function(a,b){var d=0,c=0,e=0;if(640600/b?600/b:640/a)c=b*d,e=a*d}else c=b,e=a;$("#ovlMainImg").css({width:e,height:c})},setRover:function(a,b){if("undefined"==typeof this.lastLinkId||this.lastLinkId!=b)(new Image).src="//rover.ebay.com/roverclk/0/0/9?trknvp=sid%3D"+a+"."+b;this.lastLinkId= b},updateVehicleCount:function(a){var b=document.getElementById(this.conf.mainId+"_vct");b&&(b.innerHTML=a)},updateHTCount:function(a){var b=document.getElementById(this.conf.mainId+"_htct");b&&(b.innerHTML=a)},showNotes:function(a,b){var d=this.getChild(this.conf.olyId);this.pubsub.publish("_CLOSE_OLAY",{cmpId:this.conf.olyId});d&&d.conf&&(document.getElementById(this.conf.mainId+"notesOlp").innerHTML=a,d.conf.trigger=b,d.show($("#"+d.conf.trigger)))},createFilters:function(a,b,d){for(var c=this, e=c.conf,h="-"+c.conf.selectTxt+"-",f,g=0;ga.index)&&(c.selectedIndex=0);c&&(c.disabled=a&&c?a.indexh;h++)if((f=document.getElementById(a[h]))&&0===f.selectedIndex){d=!1;break}e.disabled=!d;c-=1}for(h=0;h=e.options.length){var i=new Option(this.SP[e.id],this.SP[e.id]);e.options[e.options.length]=i;i.selected=!0}}}catch(j){}}},updateComponent:function(a){a=a.data;if(0h&&(c+="+"):c+="+");b+=f[1];d+=f[1];"100"==this.conf.site&&848!=this.conf.catalogId?3>h&&(c+=f[1]):c+=f[1]}this.selVel=encodeURIComponent(d);this.nullReccoKeyword=c;return b},updateVehicleChosen:function(a){var b=this.conf.mainId,d=document.getElementById(b+"vchsn");d&&(d.innerHTML=" "+a);if(d=document.getElementById(b+"vnmchsn"))d.innerHTML=" "+a+"."},vehFilterSelected:function(){document.getElementById(this.srchFlds["77"==this.conf.site?1:0]).disabled= !1;$("#"+this.conf.mainId+"Go").attr("disabled",!0)},mvRadioClicked:function(){this.resetSrchFldFilters();$("#"+this.conf.mainId+"Go").attr("disabled",!0)},dropdownClicked:function(){this.resetSrchFldFilters();this.conf.pullMenuCSId&&this.pubsub.publish("_CLOSE_OLAY",{cmpId:this.conf.pullMenuCSId});this.conf.helpCSId&&this.pubsub.publish("_CLOSE_OLAY",{cmpId:this.conf.helpCSId})},createHsnTsnFilters:function(a){var b=this,d=a.insertCell(0);d.style.paddingRight="10px";var c=document.createElement("INPUT"); c.type="TEXT";c.maxLength=4;c.size=5;c.id=b.conf.mainId+"hsnBox";c.value="zu 2";c.style.color="#999999";c.onfocus=function(){$("#"+b.conf.mainId+"htfltr").prop("checked",!0);$("#"+b.conf.mainId+"hsnBox").prop("disabled",!1);$("#"+b.conf.mainId+"tsnBox").prop("disabled",!1);for(var a=b.srchFlds,c=1;c")}catch(l){}k||(k=document.createElement("INPUT"),k.type="RADIO",k.id=this.conf.mainId+"pick"+c,k.name="vehpick",k.value=this.getChoosenVehicle(d,j));i.appendChild(k)}else i=f.insertCell(g),i.innerHTML=j[d[g]]}this.pubsub.publish("_CLOSE_OLAY",{cmpId:this.conf.htOverlayOSId});if((a=this.getChild(this.conf.htOverlayOSId))&&a.conf)a.conf.trigger=this.conf.hsnTsnGoBtn, a.show($("#"+a.conf.trigger))}else this.showHide("dcthd ctVMTxt ctHTMTxt ctHTIFTxt ctVNMTxt dthr dctbl err".split(" "),!0),this.showHide(["ctHTNMTxt","ctshd"],!1);this.pubsub.publish("_CLOSE_OLAY",{cmpId:this.conf.pullMenuCSId})},htOlySelect:function(){for(var a,b=this.overlayRowCount,d=0;df&&(h+="+"):h+="+");if(!this.isGoClicked||!g.disabled)d+=g.id+":"+g.options[g.selectedIndex].value,e+=g.options[g.selectedIndex].value, "100"==this.conf.site&&848!=this.conf.catalogId?3>f&&(h+=g.options[g.selectedIndex].value):h+=g.options[g.selectedIndex].value;if(a&&a.id===g.id)break}}this.selVel=encodeURIComponent(e);b&&("100"==this.conf.site&&848!=this.conf.catalogId)&&(c=this.isFieldsMapped1to1("Submodel","Trim"),-1!=c&&(g=document.getElementById("Submodel"),d=d+"|"+(g.id+":"+g.options[c].value),h=h+"+"+g.options[c].value+"+"),c=this.isFieldsMapped1to1("Engine - Liter_Display","Engine"),-1!=c&&(g=document.getElementById("Engine - Liter_Display"), d=d+"|"+(g.id+":"+g.options[c].value),h+=g.options[c].value));this.nullReccoKeyword=h}return encodeURIComponent(d)},isFieldsMapped1to1:function(a,b){var d=document.getElementById(a),c=document.getElementById(b);if(null==d||void 0==d||null==c||void 0==c)return-1;for(var c=c.options[c.selectedIndex].value,e=0,h=0,f=0;f').appendTo(c);b.onload=function(){function i(){k=c.outerWidth();l=c.outerHeight();j=(b.width-k)/k;q=(b.height-l)/l}function f(a){g= a.pageX-m.left;h=a.pageY-m.top;g>k?g=k:0>g&&(g=0);h>l?h=l:0>h&&(h=0);b.style.left=g*-j+"px";b.style.top=h*-q+"px";a.preventDefault()}function o(b){a(c.children()[0]).css({visibility:"hidden"});m=c.offset();i();f(b);e.stop().fadeTo(a.support.opacity?d.duration:0,1)}function p(){e.stop().fadeTo(d.duration,0);a(c.children()[0]).css({visibility:"visible"})}var k,l,j,q,g,h,m=c.offset();e.addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:b.width,height:b.height,border:"none",maxWidth:"none"}).appendTo(c); "grab"===d.on?e.mousedown(function(b){m=c.offset();a(document).one("mouseup",function(){p();a(document).unbind("mousemove",f)});o(b);a(document).mousemove(f);b.preventDefault()}):"click"===d.on?e.click(function(b){if(!n)return n=!0,o(b),a(document).mousemove(f),a(document).one("click",function(){p();n=!1;a(document).unbind("mousemove",f)}),!1}):(i(),e.hover(o,p).mousemove(f));a.isFunction(d.callback)&&d.callback.call(b)};b.src=d.url})};a.fn.zoom.defaults=i})(jQuery);raptor.defineClass("ui.Pulldown",function(){return{events:["change"],defaultConfig:{id:"",triggerMode:"click",width:"auto",height:"auto",hasIcon:!0,onChange:null,type:"normal",preventDefault:!1},clzName:{normal:"",anchor:"achr"},init:function(a){this.config=$.extend(!0,{},this.defaultConfig,a);this.pulldown=$("#"+this.config.id);this.select=this.pulldown.find("ul.select");this.options=this.pulldown.find("li.op");this.hdr=this.selectedOption=this.currentValue=this.currentOption=this.currentOptionWpr= null;this.dropped=!1;this.select.css("display","none");this.pulldown.addClass(this.clzName[this.config.type]);this.buildCurrentSelect();this.regHdlr()},buildCurrentSelect:function(){var a=this.config;this.currentOptionWpr=$("");this.pulldown.prepend(this.currentOptionWpr);this.currentOption=this.currentOptionWpr.find("span");this.highlightSelected();try{if("auto"!=a.width&&(this.currentOptionWpr.css("width",parseInt(a.width)),this.pulldown.css("width", this.currentOptionWpr.outerWidth()+20)),"auto"!=a.height){var b=parseInt(a.height)+"px";this.currentOptionWpr.css({height:b,"line-height":b,"padding-top":"0px","padding-bottom":"0px"});this.select.css("top",b)}else this.select.css("top",this.currentOptionWpr.outerHeight()+"px")}catch(c){}a.hasIcon&&(this.hdr=$(""),this.currentOptionWpr.prepend(this.hdr),this.currentOptionWpr.css("padding-right",this.hdr.width()+10+"px"),this.hdr.css("top",Math.round(this.currentOptionWpr.outerHeight()- this.hdr.height())/2+"px"));this.select.find("li.hr").css("width",this.select.width())},highlightSelected:function(a){a=this.selectedOption=a?a:this.select.find("li.sel");0==a.length&&(a=this.selectedOption=this.select.find("li:first-child"));this.currentOption.html(a.attr("label")?a.attr("label"):a.html())},regHdlr:function(){var a=this,b=a.config;"mouseover"==b.triggerMode?(a.currentOptionWpr.mouseover(function(){a.toggleDropdown(!0)}),a.currentOptionWpr.mouseout(function(){a.toggleDropdown(!1)}), a.select.mouseover(function(){a.dropped=!0}),a.select.mouseout(function(){a.toggleDropdown(!1)})):(a.currentOptionWpr.click(function(){a.toggleDropdown(!0);return!1}),a.hdr.click(function(){a.toggleDropdown(!0);return!1}),$("body").click(function(){a.toggleDropdown(!1)}));a.options.live("click",function(){var c=$(this);a.toggleDropdown(!1);if(c.attr("value")!=a.currentValue&&(a.selectedOption.removeClass("sel"),c.addClass("sel"),a.currentValue=c.attr("value"),a.highlightSelected(c),b.onChange&&"function"=== $.type(b.onChange)&&b.onChange(),a.publish("change",a),b.preventDefault))return!1})},toggleDropdown:function(a){var b=this;a?(b.dropped=!0,b.select.css("display","block")):(b.dropped=!1,setTimeout(function(){b.dropped||b.select.css("display","none")},100))},getCurrentValue:function(){return this.currentValue},insertOption:function(a,b,c,d){a=$("
  • "+a+"
  • ");this.select.append(a);this.options=this.select.find("li.op");d&&(this.selectedOption.removeClass("sel"), this.highlightSelected(a))}}});raptor.defineClass("com.ebay.raptor.vi.Description",function(){return{init:function(a){var b=this;b.cfg=a;b.tId="";b.bSwap=!1;b.logHorzScrollRoverSent=!1;b.extendDescContainerRoverSent=!1;"function"==typeof window.postMessage?(window.addEventListener?window.addEventListener("message",function(a){b.rcvMsg(a)},!1):window.attachEvent("onmessage",function(a){b.rcvMsg(a)},!1),(a=document.getElementById("desc_ifr"))&&!b.executed&&a.contentWindow.postMessage(JSON.stringify({op:"resizeIframe"}),"*")):($("#desc_ifr").hasClass("lazyload")&& (b.needsToCheckHashChange=!0),b.startTimer());b.frameBuster(window.location.href);b.pubsub=raptor.require("pubsub");b.pubsub.subscribe("_RESET_FRAME_RESIZE_FLAG",function(){b.executed=!1},b);b.cfg.descSnippetEnabled&&b.bindDescOverlayEvents();try{var c=0;$("#desc_div").one("mouseenter",function(){c=(new Date).getTime()});$("#desc_div").one("mouseleave",function(){var a=(new Date).getTime()-c;trackingUtil("VI_DESC_HOVERED","ex1",a)})}catch(d){}},startTimer:function(){var a=this;a.tId=a.needsToCheckHashChange? window.setInterval(function(){a.checkMsg()},1E3):window.setTimeout(function(){a.checkMsg()},1E3)},bindDescOverlayEvents:function(){var a=this,b=0;$(a.cfg.descSnippetOpenBtn).on("click",function(){var c=document.getElementById("desc_ifr");c&&1>b&&("function"==typeof window.postMessage?c.contentWindow.postMessage(JSON.stringify({op:"resizeIframe"}),"*"):a.startTimer(),b++)})},checkMsg:function(){var a,b=window.location.hash;""!==b?a=this.parseData(b):(""===b||"undefined"===typeof b)&&this.startTimer(); a&&0!==a[0]&&this.resizeFrm(a)},parseData:function(a){var b=[0,0],c=a.indexOf("ht_"),d=a.indexOf("wt_"),c=a.substring(c+3,d),a=a.substring(d+3);b[0]+=Number(c);b[1]+=Number(a);return b},resizeFrm:function(a){var b=$.browser,c=document.getElementById("desc_ifr"),b=b.mozilla?24:54;""!==this.tId&&window.clearTimeout(this.tId);isNaN(a[0])||("undefined"!==typeof a[0]&&0$(window).width())c={},d=$(".iti-act-num"),c.imp="2047686",c.dw=a,c.vw=$(window).width(),c.sh=b&&0 a , #vhrsl, .vi-vs-sval").click(function(a){a.preventDefault();a.stopPropagation();"vhrSeeClk"==a.target.id&&trackingUtil("VEHICLE_FREE_HISTORY_REPORT_DESCRIPTION_TAB");$("#viTabs_1").trigger("click", ["noTabTracking"]);if("vhrTitleCheckLbl"==a.target.id||"vhrTitleCheckVal"==a.target.id)window.location.hash="#title-and-problem-check";if("vhrOdoCheckLbl"==a.target.id||"vhrOdoCheckVal"==a.target.id)window.location.hash="#odometer-check";if("vhrAccidentsLbl"==a.target.id||"vhrAccidentsVal"==a.target.id)window.location.hash="#accident";if("vhrOwnersLbl"==a.target.id||"vhrOwnersVal"==a.target.id)window.location.hash="#vehicle-use-and-event-check"})}}});raptor.defineClass("ebay.viewItem.FilmStrip",function(){return{init:function(a){this.conf=a;this.imgArray=a.fsImgList;this.fsElm=$("#"+a.fsId);this.mainImgElm=$("#"+a.mainImgId);this.mainImgHldr=$("#"+a.mainImgHldr);this.pubsub=raptor.require("pubsub");this.handlrBinded||this.bindHandlr();this.registerPubSubEvents()},registerPubSubEvents:function(){var a=this;a.pubsub.subscribe("_TRIGGER_CLK_VI_FS_IMG_"+a.conf.fsId,function(b){a.triggerClickOnFsImg(b)},this)},bindHandlr:function(){this.handlrBinded= !0;this.bindTriggerEvent()},bindTriggerEvent:function(){var a=this,b=a.conf;a.fsElm.bind("click",function(b){a.hideMainImgBg();a.handleClickEvt(b)});a.fsElm.bind("mouseover",function(b){a.hideMainImgBg();a.handleMouseoverEvt(b)});a.fsElm.bind("mouseout",function(b){a.hideMainImgBg();a.handleMouseoutEvt(b)});a.fsElm.ready(function(){a.placeBorder($("div#"+b.fsId+" > ul > li:nth-child(1)"))})},hideMainImgBg:function(){this.mainImgHldr.css("backgroundImage","none")},handleClickEvt:function(a){var b= this.conf;if(!($(a.target).is("div#"+b.fsId+".flmstp")||"LI"==a.target.nodeName)){var c=parseInt(this.mainImgElm.attr("clk"))+1;c&&$("div#"+b.fsId+" > ul > li:nth-child("+c+")").css("border","");var d=-1;"LI"==a.target.nodeName?($(a.target).css("width","-=4").css("height","-=4").css("border","2px solid #666"),d=$(a.target).find("img").attr("index"),stockAttr=$(a.target).find("img").attr("stock")):($(a.target).parents("li").css("width","-=4").css("height","-=4").css("border","2px solid #666"),"IMG"== a.target.nodeName?(d=$(a.target).attr("index"),stockAttr=$(a.target).attr("stock")):(d=$(a.target).find("img").attr("index"),stockAttr=$(a.target).find("img").attr("stock")));c&&$("div#"+b.fsId+" > ul > li:nth-child("+c+")").css("width","+=4").css("height","+=4");this.pubsub.publish("_VI_FS_CLK_EVT_"+b.fsId,{currentImgIndex:this.getCurImgIndex(a),selectedIndex:d});"undefined"!=typeof stockAttr?$("#sPhoto_picLabel").show():$("#sPhoto_picLabel").hide()}},placeBorder:function(a){a&&(this.mskuSkip?$(a).css("width", "-=4").css("height","-=4").css("border","0px"):$(a).css("width","-=4").css("height","-=4").css("border","2px solid #666"))},handleMouseoverEvt:function(a){var b=this.conf;"LI"==a.target.nodeName||a.target.id==b.fsId||this.pubsub.publish("_VI_FS_MOUSE_IN_EVT_"+b.fsId,{currentImgIndex:this.getCurImgIndex(a)})},handleMouseoutEvt:function(){this.pubsub.publish("_VI_FS_MOUSE_OUT_EVT_"+this.conf.fsId,{})},getCurImgIndex:function(a){var b=0,b=$(a.target);return b="IMG"==a.target.nodeName?b.attr("index"): $(b.find("img")).attr("index")},triggerClickOnFsImg:function(a){var b=this.conf;this.hideMainImgBg();var c=$("div#"+b.fsId+" > ul > li:nth-child("+(a.index+1)+")").position().top,d=this.fsElm.position().top,c=c-d+this.fsElm.scrollTop();0>c&&(c=0);this.fsElm.scrollTop(c);$("div#"+b.fsId+" > ul > li:nth-child("+(a.index+1)+") > a").click()}}});raptor.defineClass("com.ebay.raptor.vi.ItemAttributes",function(){return{init:function(a){$("#"+a.readMoreId).one("click",function(){$(document).trigger("rover",{sid:"p2047675.l2779"});$("#"+a.hiddenContentId).attr("aria-expanded","true").show();$("#"+a.readMoreId).hide()})}}});raptor.defineClass("raptor.vi.ActionPanel",function(){var i=!1;return{init:function(a){a.bulkCartItemIdAppended=!1;a.disableBINBtnFeatureON=a.disableBINBtnFeatureON;a.busy=!1;this.isBOPIS=a.isBOPIS;this.isBOPISOnly=a.isBOPISOnly;this.isPUDO=a.isPUDO;this.isEncodeBOPISUrl=a.isEncodeBOPISUrl;this.pubsub=raptor.require("pubsub");this.msgs=raptor.require("com.ebay.raptor.vi.MsgHandler");this.registerPubSubMsgs(a);this.bindClickEventsOnButtons(a);this.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil"); a.isSMEInterruptLayer&&(this.isSMEInterrupt=!0);a.isCartLyr&&(this.cartLyr=!0);this.isAddOnInstallationEnabled=!1;this.isAddOnInterceptEnabled=a.isAddOnInterceptEnabled;this.isAddOnInstallationChecked=!1;this.binUrl=a.binURL},bindClickEventsOnButtons:function(a){var b=this;if(a.isFeedbackLinkActive){var c=$(".vi-feedback"),e=$("#vi-feedback-link-to-olay");if(c&&0 span");b.atcLayerWrapper=b.overlayParent.find(".atc-layer-wrapper");b.nodeServiceErr=b.overlayParent.find(".node-service-err");b.overlayCloseBtn=b.overlayParent.find(".viicon-close");b.spinnerTxt=b.overlayParent.find(".vi-spinnerText");b.smeLink=b.overlayParent.find(".app-atc-layer__sme >a");b.viewAllLink=b.overlayParent.find(".viewAllLink");b.showOrHidethrobber(!0);var d=b.validateAndAppendMsku("&variation_id=")|| "",c=b.validateAndAppendQty("&quantity=");b.ajaxUtil.getJSON("/cta/addtocart?item="+a.itemId+c+d+"&_trksid=p2047675.l1473",b.atcResponseHandler,b)},b.onCloseATCLayer=function(){var a={sid:b.overlayCloseBtn.attr("data-trkid")};$(document).trigger("pulsar",a);a=window.location.href;if(b.variationId)if(!(-1=c.days?g?a.getDate()+"/"+(a.getMonth()+1):a.getMonth()+1+"/"+a.getDate():1<=c.days?this.getDay(a,b):b.endsTomorrowTerm,a=210==b.siteId?a+(", "+d+" h "+e+f):a+(", "+d+":"+e+f)):a=210==b.siteId?b.todayTerm+", "+d+" h "+e+f:b.todayTerm+" "+d+":"+e+f;b.isEnded&&(a=", ", a=210==b.siteId?a+(d+" h "+e+f):a+(d+":"+e+f));return a},getDay:function(a,c){var b=a.getDay();return c.days[b]},structureDiffData:function(a){var a=a/1E3,c=parseInt(a/86400),b=a%3600;return{days:c,hours:Math.floor(a%86400/3600),minutes:Math.floor(b/60),seconds:Math.floor(b%60)}}}});raptor.defineClass("com.ebay.raptor.vi.TimeLeft",function(){return{init:function(a){var b=this;b.pubsub=raptor.require("pubsub");b.bidUtil=raptor.require("com.ebay.raptor.vi.bid.BidUtil");b.timeLeft={};b.stopTimer=!1;b.cfg=a;b.pubsub&&((a.isUrgencyHigh||a.isUrgencyMedHigh||a.enableAFAlways)&&(!a.isBinCounter&&!a.isDealsTimer)&&b.pubsub.publish(a.timerSvcId,{}),b.pubsub.subscribe(a.pbSvcId,function(){b.stopTimer=!0},b),b.pubsub.subscribe(a.powSvcId,function(){b.stopTimer=!0},b),b.pubsub.subscribe(a.ocbSvcId, function(){b.stopTimer=!0},b),b.pubsub.subscribe(a.counterSvcId,function(a){b.timeLeftCounter(a)},b),b.pubsub.subscribe(a.autoRefreshSvcId,function(a){b.autoRefresh(a)},b),b.pubsub.subscribe(a.timerStopSvcId,function(){window.setTimeout(function(){b.refreshPage()},2500)},b));if(a.isBinCounter||a.isDealsTimer)a.timeLeft={day:a.timeLeft.daysLeft,hour:a.timeLeft.hoursLeft,minute:a.timeLeft.minutesLeft,second:a.timeLeft.secondsLeft},b.startCountdown(a.timeLeft)},timeLeftCounter:function(){var a;this.bidUtil&& !this.stopTimer&&(a=this.bidUtil.decrementOneSec(this.getTimeLeft()),this.updateTimeLeft(a))},startCounter:function(a,b,c){var d=this.cfg,b={TimeLeft:a,AccessedDate:b,ViewerItemRelation:c,DetailLevel:d.detailLevel};this.setTimeLeft(a);this.pubsub&&this.pubsub.publish(d.counterStartSvcId,b)},startCountdown:function(a){var b=this.cfg;this.setTimeLeft(a);this.timeLeftCounter(b)},autoRefresh:function(a){var b;a&&!this.stopTimer&&(b=this.bidUtil.timeLeftV(a.TimeLeft),this.updateTimeLeft(b),this.startCounter(b, a.AccessedDate,a.ViewerItemRelation))},updateTimeLeft:function(a){var b=this.cfg,c="";a&&($("#"+b.timeLeftId).removeClass(b.lessTimeCss),c=0>=a.hour&&!b.isDealsTimer?b.hotTimeCss:b.lessTimeCss,formatCfg={dayTxt:b.dayTxt,dayCharTxt:b.dayCharTxt,hourTxt:b.hourTxt,hoursTxt:b.hoursTxt,hourCharTxt:b.hourCharTxt,minuteCharTxt:b.minuteCharTxt,secondCharTxt:b.secondCharTxt,cssElemId:b.timeLeftId,css:c},c=this.bidUtil.timeLeftFormat(a,formatCfg,b.isDealsTimer,b.enableAFAlways),$("#"+b.timeLeftId).html(c), this.pubsub.publish("VI_TIME_LEFT_UPDATE",{content:c,className:$("#"+b.timeLeftId).attr("class")}),b.isAccessibilityOffScreenTimerOn&&this.pubsub.publish("OFFSCREEN_BID",{timerId:"offscreenTimerPage",isOffScreenOnBidLayer:0,insertionPoint:$("#vi-time-wrapperSection"),timeLeft:a,sourceOfTimer:$("#vi-cdown_timeLeft")}))},setTimeLeft:function(a){self.timeLeft=a},getTimeLeft:function(){return self.timeLeft},refreshPage:function(){var a;a=window.location.href;a=a.replace(/#ht_.*/,"");a=a.replace("&autorefresh=true", "");a+=-1!=a.indexOf("?")?"&autorefresh=true":"?autorefresh=true";top.location.replace(a)}}});raptor.defineClass("com.ebay.raptor.vi.ValidateQuantity",function(){return{init:function(a){var b=this;b.cfg=a;b.disableQtyChk=a.disableQtyCheck;b.pubsub=raptor.require("pubsub");b.pubsub.subscribe("VALIDATE_QTY",function(a){b.validate(a)},b);b.pubsub.publish("VALIDATE_QTY",a);$("#"+a.qtyBoxId).keyup(function(){b.pubsub.publish("VALIDATE_QTY",a);var c=a.smeOfferTiers;c&&0=parseInt(c[i].fromQuantityConditionValue)&&a<=parseInt(c[i].toQuantityConditionValue)){b.html(c[i].afterDiscountItemPriceWithSymbol);break}a>=parseInt(c[c.length-1].toQuantityConditionValue)&&b.html(c[c.length-1].afterDiscountItemPriceWithSymbol)},registerPubSubMsgs:function(a){this.pubsub&&(this.pubsub.subscribe(this.msgs("TOGGLE_QTY_DISPLAY_STATE"), function(b){this.toggleQtyBox(a,b.isDisabled);this.variationId=b.variationId},this),this.pubsub.subscribe(this.msgs("VALIDATE_QTY_MSKU"),function(b){this.validateMSKUQty(a,b)},this),this.pubsub.publish(this.msgs("VALIDATE_QTY_MODULE_READY"),{}))},toggleQtyBox:function(a,b){$("#"+a.qtyBoxId).attr("disabled",b);b&&$("#"+a.qtyBoxId).attr(a.isValid,"false");$("#"+a.qtyBoxId).val(1)},validateMSKUQty:function(a,b){a.remainingQty=b.quantityAvailable;a.maxQty=b.supressQty?b.maxQty:b.quantityAvailable;a.variationId= b.variationId;a.isSupressQty=1===b.quantityAvailable?!1:b.supressQty;this.pubsub.publish("VALIDATE_QTY",a)},validate:function(a){var a=a||this.cfg,b=raptor.require("pubsub");if(a){var c=$("#"+a.qtyBoxId),e=$(c).val(),d=a.remainingQty,j=a.maxQty,q=$("#"+a.errorIcon),m=$("#"+a.errorMsg),g=!0,f,k=d,r=this.isInteger(e),n=a.isMinRemnantSetEnabled,h=a.remnantQtyValue,o=0,l=0,p;n&&(o=d-h+1,l=d-e);if(!$(c).attr("disabled")){e=parseInt(e,10);!r||1>e?f=1===d?a.errTextMap[1]:a.errTextMap[3]:this.disableQtyChk? g=!1:0j?j>d?f=a.errTextMap[4]:(f=a.errTextMap[2],k=j):e>d?f=a.isSupressQty||d>a.availQtyThreshold?a.errTextMap[4]:1===d?a.errTextMap[1]:a.errTextMap[0]:n?h===d&&e=e))return!1}return!0}return!1}}});raptor.defineClass("com.ebay.raptor.vi.itemsummary.gotogether.GoTogether",function(){return{init:function(a){var b=this,c;b.cfg=a;1=a.varId)a.varId=$("#"+a.selectedVarDomId).html();if("t"==a.binEnabled)return b.pubsub.publish(b.msgs("BIN_SVC_ID"),{vQty:$("#"+c.qtyBoxId).val(),vId:a.varId,dcl:!0}),!1;b.duringChkoutUrl=a.duringChkoutUrl;a.duringCheckoutGXOUrl&&($("#sh-not-mayBe")&&0<$("#sh-not-mayBe").length)&&(b.duringChkoutUrl=a.duringCheckoutGXOUrl);window.location=b.duringChkoutUrl+"&var="+a.varId+"&quantity="+$("#"+c.qtyBoxId).val()}})})}}});raptor.defineClass("com.ebay.raptor.vi.msku.ItemVariations",function(){return{init:function(a){this.newTouchMsgFix=a.newTouchMsgFix;a.defaultPopStackWatchers=-1;a.updateSelectFlag=!0;this.setOptionsObj(a);this.pubsub=raptor.require("pubsub");this.msgs=raptor.require("com.ebay.raptor.vi.MsgHandler");this.bindEventsOnSelectBoxes(a);this.registerPubSubEvents(a);this.mskuDrpClkd=!1;try{this.pubsub.publish(this.msgs("VARIATIONS_CONFIG_READY"),a.itmVarModel)}catch(b){}-1!=a.itmVarModel.selectedVariationId&& $("#"+a.selPrefix+"1").change();$(window).load(function(){a.isMSKURedesign&&$(document).trigger("rover",{sid:"p2047675.l5902"})})},registerPubSubEvents:function(a){var b=this;1>=parseInt(a.totalValidVariationsExt)&&-1==a.itmVarModel.selectedVariationId&&b.setVariationId(a);var c=a.hasCart?3:2;b.modulesReadyObj=a.isWdgtLoadingDelayed?{quant:0,list:0,cart:0,total:c,triggerThreshold:c}:{quant:0,list:0,cart:0,total:0,triggerThreshold:c};this.pubsub.subscribe(b.msgs("VALIDATE_MSKU_VARIATIONS"),function(){this.validateMskuSelectBoxes(a)}, this);this.pubsub.subscribe(b.msgs("TRIGGER_MSKU_IMG_GROUPING"),function(c){this.sendMSKUImgGroupsToFilmStrip(a,c)},this);this.pubsub.subscribe(b.msgs("VARIATION_EDIT_WATCH_STATUS"),function(c){a.itmVarModel.itemVariationsMap[c.variationId].variationWatched=c.variationWatched},this);a.isWdgtLoadingDelayed&&b.qtyReaadyOnLoad(a);this.pubsub.subscribe(b.msgs("VALIDATE_QTY_MODULE_READY"),function(){b.qtyReaadyOnLoad(a)},this);this.pubsub.subscribe(b.msgs("VALIDATE_MAPSTP_MODULE_READY"),function(){-1!= a.itmVarModel.selectedVariationId&&a.itmVarModel.itemVariationsMap[a.itmVarModel.selectedVariationId].quantityAvailable&&this.makeMapStpUpdateCall(a,a.itmVarModel.selectedVariationId)},this);this.pubsub.subscribe(b.msgs("VALIDATE_LIST_MODULE_READY"),function(){-1!=a.itmVarModel.selectedVariationId&&a.itmVarModel.itemVariationsMap[a.itmVarModel.selectedVariationId].quantityAvailable&&(0==this.modulesReadyObj.list&&(this.modulesReadyObj.list=1,this.modulesReadyObj.total=this.modulesReadyObj.quant+this.modulesReadyObj.list+ this.modulesReadyObj.cart),this.modulesReadyObj.total==this.modulesReadyObj.triggerThreshold&&this.makeAllPostVariationValidationCalls(a,a.itmVarModel.selectedVariationId))},this);this.pubsub.subscribe(b.msgs("VALIDATE_CART_MODULE_READY"),function(){-1!=a.itmVarModel.selectedVariationId&&a.itmVarModel.itemVariationsMap[a.itmVarModel.selectedVariationId].quantityAvailable&&(0==this.modulesReadyObj.cart&&(this.modulesReadyObj.cart=1,this.modulesReadyObj.total=this.modulesReadyObj.quant+this.modulesReadyObj.list+ this.modulesReadyObj.cart),this.modulesReadyObj.total==this.modulesReadyObj.triggerThreshold&&this.makeAllPostVariationValidationCalls(a,a.itmVarModel.selectedVariationId))},this)},qtyReaadyOnLoad:function(a){var b=this;a.lastOptionPseudoId=1;if(!a.isEndedItem){var c=$("#"+a.selectedVarDomId).html();if((a.allBoxesSelected&&-1==parseInt(c)||!a.allBoxesSelected&&3Error icon');e.parent().children().last().hasClass("err")?e.parent().children().last().show():e.parent().children().last().after('
    '+a.errorMsg.replace("?",this.displayName)+"
    ");d.attr("aria-label",a.errorMsg.replace("?",this.displayName))}else"errorIcon"===e.prev().attr("class")&&(e.prev().css("display","none"),e.next().hasClass("err")?e.next().css("display","none"):e.next().next().css("display","none"),d.css("border","1px solid lightgray"),d.removeClass("vi-VR-ie7red"));b++});"undefined"!=typeof c&&document.getElementById(c).focus()},bindEventsOnSelectBoxes:function(a){var b=this,c=a.itmVarModel,d=1;a.selectBoxOpen= !1;1<=c.menuModels.length&&$.each(c.menuModels,function(){a.isMSKURedesign&&$("#"+a.selBtnPrefix+d+" span.btn").bind("click",function(c){var d=$(this);b.mskuBtnUIEventHandler(a,d,c)});$("#"+a.selPrefix+d).bind("change",function(){b.updateSelectBoxesOnChange(a,this.getAttribute("pseudoid"),!0);try{if(!b.mskuDrpClkd){var c=$(".msku-sel").length+":"+this.getAttribute("pseudoid")+":"+this.selectedIndex;trackingUtil("VI_MSKU_DRP_CLICK","vi_msel",c);b.mskuDrpClkd=!0}}catch(d){}});d++})},mskuBtnUIEventHandler:function(a, b){var c=b.parent().attr("pseudoid"),d=$(b).attr("mskudisabled"),e=$(b).attr("outofstock");"undefined"!==typeof d&&!1!==d&&this.showAllDropDownOptions(a);"undefined"!==typeof e&&!1!==e||$("#"+a.selPrefix+c).val(b.attr("value")).change()},resetMskuBtnUI:function(a){var b=1;$.each(a.itmVarModel.menuModels,function(){$.each(this.menuItemValueIds,function(c,b){var e=$("#"+a.optBtnPrefix+b);if(e.removeClass("msku-maroon-border")){var h=e.parent().attr("pseudoid");$("#"+a.selPrefix+h).val(e.attr("value")).change()}e.removeClass("msku-maroon-dotted-border")}); b++})},updateMskuBtnUI:function(a){var b=1;$.each(a.itmVarModel.menuModels,function(){$.each(this.menuItemValueIds,function(c,b){var d=$("#"+a.optBtnPrefix+b);d.removeClass("msku-maroon-border");if(0<$("#"+a.optPrefix+b).length){var f=$("#"+a.optPrefix+b).attr("outofstock");"undefined"!==typeof f&&!1!==f?d.attr("mskudisabled","disabled"):d.removeAttr("mskudisabled")}else d.attr("mskudisabled","disabled")});var c=$("#"+a.selPrefix+b);if(-1!=c.val()){var d="btn btn-s msku-maroon-border ";$("#"+a.optBtnPrefix+ c.val()).hasClass("msku-color-box-cntr")&&(d+="msku-color-box-cntr");$("#"+a.optBtnPrefix+c.val()).attr("class",d)}b++})},updateSelectBoxesOnChange:function(a,b,c){var d=this,e=a.itmVarModel,h=1,g={},f=0,n=!1,j=-1,o=0,k=-1;d.clickEmergedFromSelectBox=c;$.each(e.menuModels,function(){var c=$("#"+a.selPrefix+h),b;b=a.isRefresh||a.isRedesign?c.parent():c;"errorIcon"===b.prev().attr("class")&&"none"!=b.next().css("display")&&(n=!0,d.isAlreadyValidated=!0);-1!=c.val()&&(this.hasPictures&&(j=c.val()),f++, c=e.menuItemMap[c.val()].matchingVariationIds,$.each(c,function(a,c){g[c]=g.hasOwnProperty(c)?g[c]+1:1}));h++;o++});n&&d.validateMskuSelectBoxes(a);0").html(b.watchCountMessage).text(),$("#"+a.popStackWatchersId).parent().html(c)):($("#"+a.popStackWatchersId).parent().html(''),$("#"+a.popStackWatchersId).parent().next().hide()),this.updatePopStackHotness(b.watchCountHot,a.popStackWatchersId))},updatePopStackHotness:function(a, b){var c=$("#vi-pop-viewz"),d=!1;0=a.lotSize?d?($("#qtySubTxt").html(''+a.almostGoneContent+""),$("#qtySubTxt").addClass("vi-VR-qtyAvlbAlgn")):0a.availableQtyThreshold&&!a.isSellerView?($("#qtySubTxt").html(a.qtyMsgMoreTen.replace("-1",a.availableQtyThreshold)),a.isRedesign&&$("#qtySubTxt").addClass("vi-VR-qtyAvlbAlgn ")):e?($("#qtySubTxt").html(''+ a.lastOneContent+""),$("#qtySubTxt").addClass("vi-VR-qtyAvlbAlgn")):0<=quantityAvailable&&($("#qtySubTxt").html(a.qtyMsgAvlb.replace("-1",quantityAvailable)),$("#qtySubTxt").addClass("vi-VR-qtyAvlbAlgn")):1==quantityAvailable?$("#qtySubTxt").html(a.lotMsgAvlb.replace("-1",a.availableQtyThreshold)):0a.availableQtyThreshold?$("#qtySubTxt").html(a.lotsMsgAvlb.replace("-1",a.availableQtyThreshold)):$("#qtySubTxt").html(a.lotsMsgMoreTenAvlb.replace("-1", a.availableQtyThreshold)));this.pubsub.publish(this.msgs("VALIDATE_QTY_MSKU"),{quantityAvailable:quantityAvailable,maxQty:c.maxQuantity,supressQty:a.supressQty})},makeMapStpUpdateCall:function(a,b){var c=a.itmVarModel.itemVariationsMap[b],d=c.amountSaved;c.savingsPercent&&(d=a.isRedesign?c.savingsPercent+"% off":3==a.siteId?d+(" ("+c.savingsPercent+"% "+a.savingsRateUpperCase+"*)"):a.isEUSite?d+(" (-"+c.savingsPercent+" %*)"):d+(" ("+c.savingsPercent+"% "+a.savingsRateLowerCase+")"));c.vatPrice&& $("#vi-binprcminusvat").html(c.vatPrice);var e={retailPrice:c.originalRetailPrice,amtSaved:d,binPrice:c.price,varId:b,convPrice:c.convertedPrice,savingsPercentValue:c.savingsPercent};"STP"==c.pricingTreatment?this.pubsub.publish(this.msgs("UPDATE_STP_VALUES"),e):("DURING_CHECKOUT"==c.minAdvertisedPriceExposure?($("#vi-mskumap-postchkout").show(),$("#vi-mskumap-prechkout").hide(),$("#vi-mskumap-none").hide()):"PRE_CHECKOUT"==c.minAdvertisedPriceExposure?($("#vi-mskumap-postchkout").hide(),$("#vi-mskumap-prechkout").show(), $("#vi-mskumap-none").hide()):"NONE"==c.minAdvertisedPriceExposure&&($("#vi-mskumap-postchkout").hide(),$("#vi-mskumap-prechkout").hide(),$("#vi-mskumap-none").show()),this.pubsub.publish(this.msgs("UPDATE_MAP_VALUES"),e));a.isRedesign?"NONE"==c.pricingTreatment&&!c.originalPrice&&"undefined"==typeof a.dealInfo?$("#"+a.priceCntrId).addClass("vi-VR-hidePriceCntr"):$("#"+a.priceCntrId).removeClass("vi-VR-hidePriceCntr"):"NONE"==c.pricingTreatment?$("."+a.priceCntrId).css("display","none"):$("."+a.priceCntrId).css("display", "block");$("#prcIsum").html(c.price);c.totalPrice&&null!=c.totalPrice&&$("#mtp_yotpp").html(c.totalPrice);$("#prcIsumConv span").html(c.convertedPrice);$("#binPrice").html(c.convertedPrice);$("#mm-saleOrgPrc").html(c.originalPrice);$("#mm-saleDscPrc").html(c.price);(e=$("#vi-priceDetails .vi-originalPrice"))&&0'+k+""),$.each(this.menuItemValueIds,function(c,b){null!=$("#"+a.optPrefix+b)&&$("#"+a.selPrefix+d).append(n["select-"+ d][b]);$("#"+a.optPrefix+b).show()});else{var l=j.val();-1==l?$("#"+a.selPrefix+d).html('"):$("#"+a.selPrefix+d).html('");var m=[];$.each(b,function(a,b){var d=e.itemVariationsMap[a].traitValuesMap[o.name],j=!1;if(2<=parseInt(c)&&-1==parseInt(l)&&2!=h||c==h&&2!=h)if(bf[d].count&&(f[d].count=b),e.itemVariationsMap[a].inStock&&(f[d].outofstock=!1))});m.sort(function(a,c){return a-c});for(k=1;k'+ d+"");$.each(this.menuItemValueIds,function(d,e){$("#"+a.selPrefix+b).append(c["select-"+b][e]);$("#"+a.optPrefix+e).removeAttr("selected");$("#"+a.optPrefix+e).show();$("#"+a.tmpCloneElmId).html("");var f=$("#"+a.tmpCloneElmId).append($("#"+a.optPrefix+e).clone()).html(),f=f=f.replace('selected="selected"',""),f=f=f.replace("selected","");c["select-"+b][e]=f});e.attr("selectedIndex",0);e.val(-1);b++});this.resetMessages(a)}}});raptor.defineClass("raptor.vi.OnDemandTransl",function(){return{init:function(a){this.pubsub=raptor.require("pubsub");this.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");this.addEventListener(a);this.bSwap=!1;this.lstSelLng={};this.lstLng={}},addEventListener:function(a){for(var c=this,b=0;b'),document.getElementById(c)||(a=document.createElement("script"),a.id=c,a.async=!0,a.defer=!0,a.src=b.plaModel.socialSignalsJsUrl,$(window).load(function(){document.getElementsByTagName("head")[0].appendChild(a)})))},talkOverlayClose:function(){var b=this.cookie.readCookie("dp1","pbf");this.cookie.writeCookielet("dp1","pbf",this.cookie.setBitFlag(b,66,1))}}});raptor.defineClass("com.ebay.raptor.vi.shipping.CalculateImportCharge",function(){return{init:function(a){this.cfg=a;this.pubsub=raptor.require("pubsub");this.sendGetRatesCall()},sendGetRatesCall:function(){var a=this,b=a.cfg,c=b.calcImportChargeUrl;a.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");c||(c="http://www.d-sjc-00532519.dev.ebay.com:8080/itm/getrates?item=250002821288&country=3&zipcode=95123");b.calculateOnLoad?(c=a.appendParameters(c,{co:"1",maxBid:b.maxBidAmt}),a.triggerCall(c)): $("#"+b.impChIdLink).click(function(){var c=b.calcImportChargeUrl;c&&(c=a.appendParameters(c,{co:"1",maxBid:b.maxBidAmt}),a.triggerCall(c))})},appendParameters:function(a,b){return a?a+"&"+$.param(b):a},triggerCall:function(a){this.ajaxUtil.getJSON(a,this.handleResponse,this)},handleResponse:function(a){var b=this.cfg;b.calculateOnLoad?this.pubsub.publish("IMP_CHARGE_RESPONSE",a):a&&a.impChCost?($("#"+b.impChIdCnt).html(a.impChCost),$("#"+b.impChBidTxtId).show()):($("#"+b.impChIdCnt).html(""),$("#"+ b.impChBidTxtId+"Err").show())}}});raptor.defineClass("raptor.vi.SimilarItems",function(){return{init:function(a){this.cfg=a;this.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");this.addEventListener(a);this.disableAnchor()},addEventListener:function(a){var b=this;$("#"+a.selView).mouseover(function(){b.showMenu(a)});$("#"+a.selView).mouseout(function(){b.hideMenu(a)});$("#"+a.selMenu).mouseout(function(){b.hideMenu(a)});$("#"+a.selGallery).click(function(){b.request(a.gvUrl)});$("#"+a.selList).click(function(){b.request(a.lvUrl)})}, disableAnchor:function(){$('a[href="#shId"]').replaceWith($('a[href="#shId"]').text());$('a[href="#rpdId"]').replaceWith($('a[href="#rpdId"]').text())},showMenu:function(a){$("#"+a.selMenu).show()},hideMenu:function(a){$("#"+a.selMenu).hide()},request:function(a){var b=this.cfg;this.ajaxUtil.getJSON(a,this.response,this);this.hideMenu(b)},response:function(a){var b=this.cfg,d=$("#"+b.siDivId),c=$("#"+b.tglView);a&&d&&(d.html(a.hlpView),$(c).hasClass("vLIST")?($(c).addClass("vGRID"),$(c).removeClass("vLIST"), $("#"+b.selMenu).addClass("lv"),$("#"+b.selMenu).removeClass("gv"),$("#"+b.selList).show(),$("#"+b.selGallery).hide()):($(c).addClass("vLIST"),$(c).removeClass("vGRID"),$("#"+b.selMenu).removeClass("lv"),$("#"+b.selMenu).addClass("gv"),$("#"+b.selGallery).show(),$("#"+b.selList).hide()))}}});raptor.defineClass("com.ebay.raptor.vi.shipping.ShippingQuoteGigaMove",function(){return{init:function(a){this.cfg=a;this.pubsub=raptor.require("pubsub");this.bindClick()},bindClick:function(){var a=this;$("#viTabs_1, #viTabs_2").bind("click",function(b){"Shipping and payments"==b.target.innerHTML&&a.getshippingUrl()});$(".vhr_shp").bind("click",function(){a.getshippingUrl()})},getshippingUrl:function(){var a=this.cfg;""!=a.shippingUrl&&0==$("#shippingSection #subcontent").length&&(url=a.shippingUrl, this.makeCall(url,this.display,this))},makeCall:function(a,b){this.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");this.ajaxUtil.getJSON(a,b,this)},display:function(a){a&&(a=a.SubContent,$("#shippingSection").html(a))}}});raptor.defineClass("ebay.viewItem.solt",function(){return{init:function(a){this.conf=a;this.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");a.url&&this.makeInstantSaleFrameCall();this.quickSaleInit()},makeInstantSaleFrameCall:function(){var a=this.conf;a.url&&this.ajaxUtil.getJSON(a.url,this.processInstantSaleResponse,this)},processInstantSaleResponse:function(a){var b=this.conf;if(a&&(a.ins_sale_price&&0"+b.soltQuickSaleMsg+""))}}});raptor.defineClass("raptor.vi.CategoryList",function(){return{init:function(a){this.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");this.handleRequest(a)},handleRequest:function(a){this.ajaxUtil.getJSON(a.refreshCateUrl)}}});raptor.defineClass("ui.Tab",function(){return{events:["select"],init:function(c){var d=this,b=$("#"+c.id),a=0,e=0,f=b.children(".tab"),h=b.children(".content"),g=f.find("a.item");g.each(function(){a+=$(this).width()+10});b.css("min-width",a+150);0!=h.length&&g.each(function(){var a=$(this);a.attr("idx",e);e++;a.click(function(){c.isDS3DeepLinksV2?1<=a.attr("idx")&&b.children(".content.sel").removeClass("sel"):b.children(".content.sel").removeClass("sel");f.find(".item.sel").removeClass("sel");$("#"+ this.id+"_cnt").addClass("sel");$(this).addClass("sel");d.publish("select",{index:$(this).attr("idx"),source:d})})})}}});raptor.defineClass("com.ebay.raptor.vi.topmessagepanel.TopMessagePanel",function(){return{init:function(a){var b=this;b.pubsub=raptor.require("pubsub");b.cfg=a;b.pubsub&&b.pubsub.subscribe(a.autoRefreshSvcId,function(a){b.setMessage(a)},b)},setMessage:function(a){var b=this.cfg,c,d=!1,e=!1,f,g;a&&!b.inlineExp&&(c=a.ViewerItemRelation,this.getTimeLeft(a),"HIGHBIDDER"==c?(f=a.IsReserve&&!a.IsReserveMet?b.CHINESE_BUYER_HIGH_BIDDER_RESERVE_NOT_MET_PC_ON:b.CHINESE_BUYER_HIGH_BIDDER_PC_ON,d=!0,e=!1,$("#"+ b.panelId).find(".msg").addClass("msg green")):"OUTBIDDER"==c&&(g=b.CHINESE_BUYER_OUTBIDDER_PC_ON,d=!1,e=!0,$("#"+b.panelId).find(".msg").addClass("msg red")),d?$("#"+b.smId).html(f):e&&$("#"+b.smId).html(g))},getTimeLeft:function(a){var a=a.TimeLeft,b=0;a&&(b=86400*a.DaysLeft+3600*a.HoursLeft+60*a.MinutesLeft+a.SecondsLeft);return b}}});raptor.defineClass("com.ebay.raptor.vi.MsgHandler",function(){var a;a={VALIDATE_MSKU_VARIATIONS:"_VALIDATE_MSKU_VARIATIONS",TRIGGER_MSKU_IMG_GROUPING:"_TRIGGER_MSKU_IMG_GROUPING",VARIATION_EDIT_WATCH_STATUS:"VARIATION_EDIT_WATCH_STATUS",VALIDATE_QTY_MODULE_READY:"VALIDATE_QTY_MODULE_READY",VALIDATE_MAPSTP_MODULE_READY:"VALIDATE_MAPSTP_MODULE_READY",VALIDATE_LIST_MODULE_READY:"VALIDATE_LIST_MODULE_READY",VALIDATE_CART_MODULE_READY:"VALIDATE_CART_MODULE_READY",GROUP_MSKU_IMAGES:"_GROUP_MSKU_IMAGES", TRIGGER_CLICK_ON_MAIN_IMG_FILMSTRIP:"_TRIGGER_CLICK_ON_MAIN_IMG_FILMSTRIP",TOGGLE_QTY_DISPLAY_STATE:"_TOGGLE_QTY_DISPLAY_STATE",UPDATE_MAP_VALUES:"_UPDATE_MAP_VALUES",UPDATE_MAP_VALUES:"_UPDATE_MAP_VALUES",UPDATE_STP_VALUES:"_UPDATE_STP_VALUES",ADD_TO_WATCH_LNK:"_ADD_TO_WATCH_LNK",ADD_TO_WATCH_BTN:"_ADD_TO_WATCH_BTN",HIDE_ADD_TO_CART_LINK:"HIDE_ADD_TO_CART_LINK",VALIDATE_QTY_MSKU:"_VALIDATE_QTY_MSKU",VARIATION_EDIT_WATCH_STATUS:"VARIATION_EDIT_WATCH_STATUS",SUBMIT_BINBTN:"_SUBMIT_BINBTN",SUBMIT_CARTBTN:"_SUBMIT_CARTBTN", REMOVE_LISTS:"_REMOVE_LISTS",LIST_ADD_SVC_ID:"_LIST_ADD_SVC_ID",LIST_REMOVE_SVC_ID:"_LIST_REMOVE_SVC_ID",TRIGGER_REMOVE_SVC_ID:"_TRIGGER_REMOVE_SVC_ID",BEST_OFFER_SVC_ID:"_BEST_OFFER_SVC_ID",REVIEW_OFFER_SVC_ID:"_REVIEW_OFFER_SVC_ID",FORCE_CLOSE_OVERLAY:"FORCE_CLOSE_OVERLAY",BIN_SVC_ID:"_BIN_SVC_ID",AUTO_REFRESH_DISABLE_BTN_SVC:"AUTO_REFRESH_DISABLE_BTN_SVC"};return function(b){return a[b]}});raptor.defineClass("com.ebay.raptor.vi.overlayHandler",function(){return{init:function(){var a=this;a.pubsub=raptor.require("pubsub");a.msgs=raptor.require("com.ebay.raptor.vi.MsgHandler");a.listOfOverlayIds=[];a.pubsub.subscribe("REGISTER_OVERLAY",function(b){a.registerOverlay(b)},a);a.pubsub.subscribe("FORCE_CLOSE_OVERLAY",function(b){a.forceCloseOverlay(b)},a)},registerOverlay:function(a){this.listOfOverlayIds.push(a.id)},forceCloseOverlay:function(a){for(i=0;i div").css({visibility:"visible"}),a&&(a=a.replace('action="http:','action="https:')), $("#vhr_ac_rpt").append(a)):(a=a.SubContent,$("#throbber_vhr").hide(),$("#vhr_ac_rpt").html(a)));$("#throbber_vhr").hide()}}});raptor.defineClass("raptor.vi.GeekSquadWidget",function(){return{init:function(b){var a=this;a.cfg=b;a.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");a.pubsub=raptor.require("pubsub");a.reqCt="";a.signin=0;a.wrtyCt=0;a.chkdVals=[];a.pubsub.subscribe("SHOW_ADDON_LABEL",function(b){a.showAddOnLabel(b)},this);$("#"+b.cnclLnk).click(function(){a.cancel()});a.pubsub.channel(b.atcOlyId).subscribe("_OLY_CLS_SVC",function(){a.onClose()},a);b.atcOnLoad&&(a.signin=1,$(document).ready(function(){a.handleCart()})); b.binOnLoad&&(a.signin=1,$(document).ready(function(){a.handleBin()}));a.addEventListener(b,null);window.getCallBack=function(c){0",{rel:"stylesheet", type:"text/css",href:b.aggrCSSURL}).appendTo("head");var c="";"undefined"!==typeof b.warrantyTerms&&(null!==b.warrantyTerms&&""!==b.warrantyTerms)&&(c=JSON.parse(b.warrantyTerms));var d=function(){$("#svcGk").services({itemToFetchServicesFor:b.itemId,siteId:b.siteId,categoryId:b.catId,disabled:!1,onSelectionChange:"getCallBack",saleType:b.saleType,serviceURL:b.serviceURL,fetchedServiceItems:c})};a.ajaxUtil.loadScripts(!0,b.widgetJSURL,function(){a.ajaxUtil.loadScripts(!0,b.aggrJSURL,d)})})},showAddOnLabel:function(){$("#addOnlbl")&& 0<$("#addOnlbl").length&&$("#addOnlbl").css("display","inline-block")},fillBinOly:function(b){var a="",c;for(c in b)b.hasOwnProperty(c)&&(a+='
    - '+b[c].warrantyProvider+" "+b[c].warrantyDescription+"
    ");$("#"+this.cfg.wtryCntDiv).html(a)},addEventListener:function(b,a){var c=this;c.pubsub.subscribe("_WARRANTY",function(b){c.handleMsg(b,a)},this)},makeSelect:function(b,a){$("#"+b.addPrId);$("#"+b.addDivId);$("#"+b.addTxtId);if(a)for(var c=0;c=i&&(top.location=a.wrtyBulkAddToCartUrl), !1;if(a.cartConfig&&a.cartConfig.isBulkCart&&0!=f){""!==e&&"undefined"!==typeof e||(e=1);if(!a.cartConfig.bulkCartItemIdAppended||f!=a.itemId)a.cartConfig.submitURL=a.cartConfig.submitURL+"&item=iid:"+f+",qty:"+e;a.cartConfig&&a.cartConfig.hasWrtyIntercept&&(a.cartConfig.hasWrtyIntercept=!1);a.cartConfig.wrtyflow=!0;this.pubsub.publish("_WARRANTY_SELECTED",{isWrty:!1});this.pubsub.publish("_SUBMIT_CARTBTN",a.cartConfig)}},makeRequest:function(b,a){this.bBin=a;var c=0=b&&(this.reqCt=1),this.buildUrl(this.bBin)):a.removeWarrantyBinLayer?top.location=a.crtUrl:this.bBin?($("#"+a.binTrbrId).hide(),$("#"+a.binCntId).show()):(this.pubsub.publish("_CLOSE_OLAY",{cmpId:a.atcOlyId}),top.location=a.crtUrl):this.pubsub.publish("_CLOSE_OLAY", {cmpId:a.binOlyId}))},cancel:function(){var b=this.cfg;raptor.require("raptor.vi.ActionPanel");this.pubsub.publish("_CLOSE_OLAY",{cmpId:b.binOlyId});this.pubsub.publish("_WARRANTY_SELECTED",{isWrty:!1});$("#"+b.binBtnId).trigger("click")},onClose:function(){var b=window.location.href,b=b.replace(/[?\&]w[b|c]olp=1/,"");top.location=b}}});raptor.defineClass("raptor.vi.Warranty",function(){return{init:function(a){this.pubsub=raptor.require("pubsub");this.ajaxUtil=raptor.require("com.ebay.raptor.vi.AjaxUtil");this.cnts=this.getArr(a.contIds);this.lbls=this.getArr(a.lblIds);this.desc=this.getArr(a.descIds);this.reqCt=this.curWrty="";this.addEventListener(a)},addEventListener:function(a){var b=this;b.cfg=a;$("#"+a.lmDivId).click(function(){b.toggleList(a)});$("#"+a.hdDivId).click(function(){b.toggleList(a)});for(var c=0;c<=b.lbls.length;c++)$("#"+ b.lbls[c]).click(function(){b.resetChkBox(this,a)});$("#"+a.cfmBtnId).click(function(){b.makeSelect(a)});$("#"+a.cnclLnk).click(function(){b.cancel()});b.pubsub.subscribe("_WARRANTY",function(a){b.handleMsg(a)},this);b.pubsub.channel(a.binOlyId).subscribe("_OLY_CLS_SVC",function(){b.onClose()},b);b.pubsub.channel(a.atcOlyId).subscribe("_OLY_CLS_SVC",function(){b.onClose()},b);a.atcOnLoad&&$(document).ready(function(){b.handleCart()});a.binOnLoad&&$(document).ready(function(){b.handleBin()})},handleMsg:function(a){this.msg= a;"undefined"==typeof a.btnId?this.handleCart():this.handleBin()},getArr:function(a){for(var b=[],c=0;cc.height?c.height:a,b=this.zoomCntr.width()/this.ratioW, b=b>c.width?c.width:b;this.zoomSelector.height(a);this.zoomSelector.width(b);this.view.append(this.zoomSelector)},initZoomViewer:function(){var c=this.conf,a=0,a=c.isNewZoomTest1?$("#LeftSummaryPanel").width()+$("#RightSummaryPanel").width():(c.redesign?$("#ItemPanel"):$("#LeftSummaryPanel")).width(),b=$("#CenterPanel"),d=$("#PicturePanel").offset(),e=$(window).height(),g=$(window).scrollTop(),f=b.height()-(d.top-b.offset().top);if(c.redesign||c.isNewZoomTest1)b.offset(),b=e+g-d.top-3,b$.browser.version?(this.maskElem.css({top:d.top+"px",left:d.left+c.mImgContainerSize+18-(c.redesign?3:0)+"px",height:f+"px",width:a-(c.redesign?0:12)+"px"}),this.zoomCntr.css({top:d.top+"px",left:d.left+c.mImgContainerSize+18-(c.redesign?3:0)+"px",height:f+"px",width:a-(c.redesign?0:c.isNewZoomTest1?-14:12)+"px"})):(this.maskElem.css({top:d.top+"px",left:d.left+c.mImgContainerSize+18-(c.redesign?3:0)+"px", height:f+"px",width:a-(c.redesign?-5:18)+"px"}),this.zoomCntr.css({top:d.top+"px",left:d.left+c.mImgContainerSize+18-(c.redesign?3:0)+"px",height:f+"px",width:a-(c.redesign?-5:18-(c.isNewZoomTest1?15:0))+"px"}))},showZoomTriggerMask:function(c){var a=this;0==a.mainImg.width()||0==a.mainImg.height()||(a.isTriggerMaskShown=!0,a.initZoom(c),a.zoomTriggerMarker.bind("mouseenter",function(b){a.showingZoom||a.showZoom(b,c)}),a.zoomTriggerMask.show(),a.pubsub.publish("_SHOW_ENLARGE_MSG",{isZoom:!0}),a.mainImg.isEnlarge&& a.zoomTriggerMask.bind("click",function(){a.hideZoom();a.pubsub.publish("viEnlargeImgLayer_SHOW_ENLARGE_IMG",{isZoom:!0})}))},hideZoomTriggerMask:function(){this.isTriggerMaskShown&&(this.zoomTriggerMask.hide(),this.isTriggerMaskShown=!1,this.mainImg.isZoom&&this.mainImg.isEnlarge&&(this.pubsub.publish("_HIDE_ENLARGE_MSG",{isZoom:!0}),this.zoomTriggerMask.unbind("click")))},showZoom:function(c,a){var b=this,d=b.conf;b.showingZoom=!0;trackingUtil("ZOOM_ON_HOVER");g.hideOtherOverlay();b.zoomImg.attr("src", b.mainImg.zoomImgUrl);b.zoomTriggerMask.hide();b.view.bind("mouseleave",function(){b.hideZoom()});$(window).bind("resize",function(){b.hideZoom()});b.view.bind("mousemove",function(a){b.handleMoveEvt(a)});b.initZoomViewer(b.imgArray[b.imgId]);b.initZoomSelector(b.imgArray[b.imgId]);b.handleMoveEvt(c);b.zoomSelector.show();b.maskElem.show();b.zoomCntr.show();b.imgCntr.show();b.zoomImg.show();b.pubsub.publish("_SHOW_ENLARGE_MSG",{isZoom:!0});b.mainImg.isEnlarge&&b.zoomSelector.bind("click",function(){b.hideZoom(); b.pubsub.publish("viEnlargeImgLayer_SHOW_ENLARGE_IMG",{isZoom:!0})});b.zoomTriggerMarker.unbind("mouseenter");d.imgCntrLeftPad=0;if((d.redesign||d.isNewZoomTest1)&&a&&b.zoomCntr.width()>a.width)d.imgCntrLeftPad=(b.zoomCntr.width()-a.width)/2;b.pubsub.publish("_TRIGGER_IMG_PRELOAD",{id:b.mainImg.id})},hideZoom:function(){this.showingZoom=!1;this.view.unbind("mousemove");$(window).unbind("resize");g.postZoomClosed();this.zoomSelector.hide();this.maskElem.hide();this.zoomCntr.hide();this.imgCntr.hide(); this.zoomImg.hide();this.zoomImg.attr("src","//p.ebaystatic.com/aw/pics/s.gif");this.mainImg.isZoom&&this.mainImg.isEnlarge&&(this.pubsub.publish("_HIDE_ENLARGE_MSG",{isZoom:!0}),this.zoomSelector.unbind("click"))},handleMoveEvt:function(c){var a=this.imgArray[this.imgId],b=this.window.scrollTop(),d=this.window.scrollLeft();this.setZoomPosition(Math.floor(c.clientX-this.viewImg.offset().left+d),Math.floor(c.clientY-this.viewImg.offset().top+b),a)},setZoomPosition:function(c,a){var b=this.conf,d=c- this.zoomSelector.width()/2,e=a-this.zoomSelector.height()/2,d=Math.max(d,0),e=Math.max(e,0),d=Math.min(d,this.viewImg.width()-this.zoomSelector.outerWidth()),e=Math.min(e,this.viewImg.height()-this.zoomSelector.outerHeight());this.zoomSelector.css({left:d+this.mainImgleftPad+1+"px",top:e+this.mainImgtopPad+"px"});this.imgCntr.css({top:-(e*this.ratioH)+"px",left:-(d*this.ratioW)+b.imgCntrLeftPad+"px"})}}});raptor.defineModule("com.ebay.raptor.vi.utils",function(){return{scrollPageToTop:function(a){if(a&&0!=a)return $("html, body").animate({scrollTop:0},300),!1}}});raptor.defineClass("com.ebay.raptor.vi.bid.powerbid.PowerBid",{superclass:"com.ebay.raptor.vi.bid.Bid"},function(){var i=function(a){this.variant=a.variant;this.trending_tracked_outbid=this.trending_tracked=this.ovV4=this.userAction=!1;this.sPTBflOld=null;this.evtNS=a.evtNS;this.amountUtils=raptor.require("com.ebay.raptor.vi.powerbid.AmountUtils");i.superclass.init.apply(this,arguments);this.invalidBidAmountErr=null};i.prototype={bidClick:function(a){var b=this.cfg,c,d;i.superclass.bidVars.apply(this); a&&(c=a.maxbid,this.shipping=a.shipping,this.impCharge=a.impCharge,this.sPTBflOld=a.sPTBflOld,d=a.isRedirect);c=c?c:b.maxBidDefVal;this.triggerCall(b.powerBidInitURL,c,!0,d,!0)},triggerCall:function(a,b,c,d,e){var f=this.cfg;if(a&&(this.invalidBidAmountErr=null,this.callFromPage=e,this.callFromPage||(this.userAction=!0,2==this.variant&&$("#"+f.rgtBubbleId).hide(),this.pubsub.publish("_CLOSE_OLAY",{cmpId:"powerBidSurveyOly"}),5this.variant&&(this.pubsub.publish("_CLOSE_OLAY",{cmpId:"helpLayerOly1"}), this.pubsub.publish("_CLOSE_OLAY",{cmpId:"helpLayerOly2"}))),b=c&&b?b:null,e||!this.valiadteInput(b))){this.hideAll(e);$("#"+f.layerWrapper).hide();this.throbber(!0);if(this.maxBidAmt=b)d?(e=-1!==a.indexOf("?")?"&":"?",e+=$.param({maxbid:b}),a+=encodeURIComponent(e)):(a+=-1!==a.indexOf("?")?"&":"?",a+=$.param({maxbid:b}));d?top.location.href=a:this.ajaxUtil&&this.ajaxUtil.getJSON(a,this.processResponse,this)}},processResponse:function(a){var b=this,c=b.cfg,d,e;if(a&&(b.callFromPage||!a.isAutoRefresh|| !b.userAction))if(d=b.BidError.valueOf(a.Error),!d||!b.isRedirectErrors(d,a.ErrorUrl))if(a.IsEnded)setTimeout(function(){i.superclass.closeLayer.apply(b)},2500);else{(e=a.isAutoRefresh?b.status:b.BidStatus.valueOf(a.Status))&&!a.isAutoRefresh&&a.ViewerItemRelation&&e!=b.BidStatus.valueOf("REVIEWBID")&&(b.BidderStatus.valueOf(a.ViewerItemRelation)==b.BidderStatus.HIGHBIDDER?e=b.BidStatus.valueOf("CONFIRMBID"):b.BidderStatus.valueOf(a.ViewerItemRelation)==b.BidderStatus.OUTBIDDER&&(e=b.BidStatus.valueOf("PLACEBID"))); e&&(b.updateCurrBidColor(a,e),b.defaultFields(a),e==b.BidStatus.PLACEBID?b.placeBid(a):e==b.BidStatus.REVIEWBID?b.reviewBid(a):e==b.BidStatus.CONFIRMBID&&b.confirmBid(a),!a.isAutoRefresh&&b.callFromPage&&b.attachPowerBidEvts(),b.status=e);if((!a.isAutoRefresh||!b.trending_tracked)&&a&&a.CurrentPrice&&a.CurrentPrice.CleanAmount&&c.trendingPrice)if(a.CurrentPrice.CleanAmount>c.trendingPrice)$(".trending_help_info").hide(),$(".trendingPriceOnBidLayer").hide(),b.trending_tracked=!1;else{$(".trending_help_info").show(); $(".trendingPriceOnBidLayer").show();b.trending_tracked=!0;var f={sid:"p2047675.l9019"};c.trendingPrice&&(f.tprice=c.trendingPrice);a.CurrentPrice&&(a.CurrentPrice.CleanAmount&&(f.curprice=a.CurrentPrice.CleanAmount),a.CurrentPrice.CurrencyCode&&(f.currency=a.CurrentPrice.CurrencyCode));f.bl=a.ViewerItemRelation&&b.BidderStatus.valueOf(a.ViewerItemRelation)==b.BidderStatus.HIGHBIDDER&&b.trending_tracked?"hl":"pl";if(a.TimeLeft){var g=0;a.TimeLeft.DaysLeft&&(g+=864E5*a.TimeLeft.DaysLeft);a.TimeLeft.HoursLeft&& (g+=36E5*a.TimeLeft.HoursLeft);a.TimeLeft.MinutesLeft&&(g+=6E4*a.TimeLeft.MinutesLeft);a.TimeLeft.SecondsLeft&&(g+=1E3*a.TimeLeft.SecondsLeft);f.timeLeft=g}e._name!=b.BidStatus.REVIEWBID._name&&!a.isAutoRefresh&&(setTimeout(function(){$(document).trigger("rover",f)},0),!b.trending_tracked_outbid&&(a.ViewerItemRelation&&b.BidderStatus.valueOf(a.ViewerItemRelation)==b.BidderStatus.OUTBIDDER&&a.OutbidBySmartBid)&&(setTimeout(function(){$(document).trigger("rover",{sid:"p2047675.l9053"})},0),b.trending_tracked_outbid= !0))}a.ViewerItemRelation&&b.BidderStatus.valueOf(a.ViewerItemRelation)==b.BidderStatus.HIGHBIDDER&&b.trending_tracked?$(".trendingPriceOnBidLayer_high").show():$(".trendingPriceOnBidLayer_high").hide();b.updateBidAmtError(d,a);b.postProcessResponse(a);a.isAutoRefresh||(b.throbber(!1),$("#"+c.layerWrapper).show(),b.setTextFocus(a),a.isNewUser?(c=$("#vi_oly_powerBid").position(),$("#vi_oly_newuserOly").css({left:c.left+385,top:c.top+90})):($("#vi_oly_newuserOly").hide(),$("#vi_oly_newuserOly_layer1").hide(), $("#vi_oly_newuserOly_layer2").hide()),b.setTimer());b.userAction=!1;!a.isAutoRefresh&&a.ROIUrls&&b.bidUtil.preload(a.ROIUrls)}},setTimer:function(){try{if("undefined"!=typeof this.sPTBflOld){var a=(new Date).getTime()-this.sPTBflOld;$(document).trigger("BflTimer",{type:"placebid",diff:a,kind:"Old",sid:"m5028"})}}catch(b){window.console&&window.console.log(b)}},setTextFocus:function(a){var b=this.cfg;if(!a.isAutoRefresh){var c;if(this.BidStatus.valueOf(a.Status)!=this.BidStatus.valueOf("REVIEWBID")){if(2== this.variant||6<=this.variant&&15>this.variant)c=b.ebayBidSectionId+b.value;c&&0<$("#"+c).length&&$("#"+c).focus()}else(2==this.variant||6<=this.variant&&15>this.variant)&&$("#"+b.reviewSectionId+b.btn).focus()}},setCursorPos:function(a,b){if(10>b)try{if(a.createTextRange){var c=a.createTextRange();c.move("character",b);c.select()}else a.setSelectionRange&&a.setSelectionRange(b,b)}catch(d){}},postProcessResponse:function(a){this.cfg.showBanner&&this.showOrHideBanner(a)},showOrHideBanner:function(a){this.BidderStatus.valueOf(a.ViewerItemRelation)=== this.BidderStatus.HIGHBIDDER?$("#vi_oly_powerBid .layerWrap .mobBan").show():$("#vi_oly_powerBid .layerWrap .mobBan").hide()},placeBid:function(a){var b=this.cfg;this.addRemoveClasses($("#"+b.layerWrapper),["conB","revB"],["plaB"]);this.updateMaximumBid(a,!1);this.updateMinToBid(a,!1);this.populateNextIncrementValue(a);!a.isAutoRefresh&&0<$("#"+b.ebayBidSectionId+b.value).length&&$("#"+b.ebayBidSectionId+b.value).val("");a.isAutoRefresh||this.cfg.isGsp&&this.updateImportCharge(!1);(14==this.variant|| !a.isAutoRefresh)&&this.updateEbaySectionTxt(a,!0);14==this.variant&&!a.isAutoRefresh&&this.updateHelpContent(a);this.confirmBidMsg(a);a.isAutoRefresh||this.updateLegalText(1);this.showOrHideEle([b.topPanelId,b.placeBidSectionId,b.bidSectionId+b.wrapper,b.disclaimerId+"_txt",b.disclaimerId],!0)},reviewBid:function(a){var b=this.cfg;this.addRemoveClasses($("#"+b.layerWrapper),["conB","plaB"],["revB"]);if(!a.isAutoRefresh&&(a.MaximumBid&&($("#"+b.reviewSectionId+b.value).html(a.MaximumBid.MoneyStandard), $("#"+b.reviewSectionId+b.value+"_hdn").val(a.MaximumBid.CleanAmount)),a.MaximumBidLocal&&$("#"+b.reviewSectionId+b.approx).html($("#"+b.approxAmtNewId).html().replace("##2##",a.MaximumBidLocal.MoneyStandard)),2==this.variant||6<=this.variant&&15>this.variant)){var c=$("#"+b.reviewSectionId+b.btn).html(),d=$("#"+b.reviewSectionId+b.value).html();c&&$("#"+b.reviewSectionId+b.btn).html(c+""+d+"")}!a.isAutoRefresh&&this.cfg.isGsp&&this.updateImportCharge(!0);a.isAutoRefresh|| this.updateLegalText(2);this.showOrHideEle([b.topPanelId,b.reviewSectionId+b.wrapper,b.disclaimerId+"_txt",b.disclaimerId],!0)},confirmBid:function(a){var b=this.cfg,c=this.BidderStatus.valueOf(a.ViewerItemRelation)===this.BidderStatus.HIGHBIDDER;this.addRemoveClasses($("#"+b.layerWrapper),["revB","plaB"],["conB"]);this.updateMaximumBid(a,!0);a.isAutoRefresh?!c&&(10==this.variant||11==this.variant||12==this.variant||13==this.variant||14==this.variant)&&$("#"+b.highBidTopSectionId).hide():this.cfg.isGsp&& this.updateImportCharge(!1);10==this.variant||11==this.variant||12==this.variant||13==this.variant||14==this.variant?this.updateMinToBid(a,!0):(this.updateMinToBid(a,!0),$("#"+b.placeBidSectionId+b.value).val(a.MaxBidPlusOneIncrement?a.MaxBidPlusOneIncrement.CleanAmount:a.MinimumToBid.CleanAmount));this.confirmBidMsg(a);(10==this.variant||11==this.variant||12==this.variant||13==this.variant||14==this.variant)&&this.populateNextIncrementValue(a);(14==this.variant||!a.isAutoRefresh)&&this.updateEbaySectionTxt(a, !1);14==this.variant&&!a.isAutoRefresh&&this.updateHelpContent(a);a.isAutoRefresh||this.updateLegalText(3);this.showOrHideEle([b.topPanelId,b.bidSectionId+b.wrapper,b.disclaimerId+"_txt",b.disclaimerId],!0);!a.isAutoRefresh&&0<$("#"+b.ebayBidSectionId+b.value).length&&($("#"+b.ebayBidSectionId+b.value).val(""),$("#"+b.ebayBidSectionId+b.value).focus())},updateHelpContent:function(a){var b=this.cfg;a&&(this.BidderStatus.valueOf(a.ViewerItemRelation)==this.BidderStatus.OUTBIDDER&&a.OutbidBySmartBid)&& (this.expandCnt(b.topHelpTxtId),$("#"+b.seeMoreHelpId).show(),$("#"+b.seeMoreHelpId+"_cnt").hide())},updateLegalText:function(a){var b=this.cfg;1==a||3==a?($(".layerWrap .rev_gsp").hide(),$(".layerWrap .rev_noGsp").hide(),b.isGsp?($(".layerWrap .noGsp").hide(),$(".layerWrap .gsp").show()):($(".layerWrap .gsp").hide(),$(".layerWrap .noGsp").show())):2==a&&($(".layerWrap .gsp").hide(),$(".layerWrap .noGsp").hide(),b.isGsp?($(".layerWrap .rev_noGsp").hide(),$(".layerWrap .rev_gsp").show()):($(".layerWrap .rev_gsp").hide(), $(".layerWrap .rev_noGsp").show()))},populateNextIncrementValue:function(a){var b=this.cfg,c=a.MaxBidPlusOneIncrement?a.MaxBidPlusOneIncrement:a.MinimumToBid,d=a.MinimumToBidLocal;bidderStatus=this.BidderStatus.valueOf(a.ViewerItemRelation);var e=bidderStatus===this.BidderStatus.HIGHBIDDER,f=b.bidBtnTxt,g=b.nowTxt;2==this.variant?($("#"+b.placeBidSectionId+b.btn).html(f+" "+c.MoneyStandard),$("#"+b.placeBidSectionId+b.value).val(c.CleanAmount)):6==this.variant||7==this.variant||8==this.variant||9== this.variant?(6==this.variant?$("#"+b.placeBidSectionId+b.btn).html($("#"+b.bidBtnTxtNowNewId).html().replace("##3##",c.MoneyStandard)):$("#"+b.placeBidSectionId+b.btn).html(f+" "+c.MoneyStandard+" "+g),$("#"+b.placeBidSectionId+b.value).val(c.CleanAmount)):10==this.variant||11==this.variant?e?(a.isAutoRefresh?(c=this.getNextIncrementAmount(a),a.LocalCurrentPrice&&(d=this.amountUtils.getLocalPrice(a,c))):a.MaximumBid?(c=a.PowerBidVal1,a.LocalCurrentPrice&&(d=a.PowerBidVal1Local)):(c=a.PowerBidVal2, a.LocalCurrentPrice&&(d=a.PowerBidVal2Local)),$("#"+b.placeBidSectionId+b.btn).html(f+" "+c.MoneyStandard),$("#"+b.placeBidSectionId+b.value).val(c.CleanAmount)):($("#"+b.placeBidSectionId+b.btn).html(f+" "+c.MoneyStandard+" "+g),$("#"+b.placeBidSectionId+b.value).val(c.CleanAmount),a.isAutoRefresh&&(a.LocalCurrentPrice&&!d)&&(d=this.amountUtils.getLocalPrice(a,c))):(12==this.variant||13==this.variant||14==this.variant)&&this.populateValuesforGamfc1(a);14!=this.variant&&a.LocalCurrentPrice&&(d||(d= this.amountUtils.getLocalPrice(a,c)),d?($("#"+b.placeBidSectionId+b.approx).html(d.MoneyStandard),$("#"+b.placeBidSectionId+b.approx).show()):$("#"+b.placeBidSectionId+b.approx).hide())},getNextIncrementAmount:function(a){return this.amountUtils&&a?this.amountUtils.getMaxPlusOneIncrementPrice(a):null},getNextIncrementLocalAmount:function(a){return this.amountUtils&&a?this.amountUtils.getMaxPlusOneIncrementLocalPrice(a):null},showOnlyTwoButtons:function(a){return 33<$(a+"_1").text().length+$(a+"_2").text().length+ $(a+"_3").text().length},IsResponseRounded:function(a){return a&&a.PowerBidVal1&&a.PowerBidVal2&&a.PowerBidVal3&&a.PowerBidVal1.MoneyStandardNoDecimals&&a.PowerBidVal2.MoneyStandardNoDecimals&&a.PowerBidVal3.MoneyStandardNoDecimals?!0:!1},populateValuesforGamfc1:function(a){try{var b=this.cfg,c=b.bidBtnTxt,d=!1;14==this.variant&&(d=this.IsResponseRounded(a));if(d)$("#"+b.placeBidSectionId+b.btn+"_1").html($("#"+b.bidBtnTxtNewId).html().replace("##3##",a.PowerBidVal1.MoneyStandardNoDecimals)),$("#"+ b.placeBidSectionId+b.btn+"_2").html($("#"+b.bidBtnTxtNewId).html().replace("##3##",a.PowerBidVal2.MoneyStandardNoDecimals)),$("#"+b.placeBidSectionId+b.btn+"_3").html($("#"+b.bidBtnTxtNewId).html().replace("##3##",a.PowerBidVal3.MoneyStandardNoDecimals));else{var a=a.isAutoRefresh?this.amountUtils.setPowerBidVal(a):this.amountUtils.roundingMakeQuickBid(a),e=this.amountUtils.removeDecimalDigits(a.PowerBidVal1.MoneyStandard,a.decimalSeparator),f=this.amountUtils.removeDecimalDigits(a.PowerBidVal2.MoneyStandard, a.decimalSeparator),g=this.amountUtils.removeDecimalDigits(a.PowerBidVal3.MoneyStandard,a.decimalSeparator);$("#"+b.placeBidSectionId+b.btn+"_1").html(c+" "+e);$("#"+b.placeBidSectionId+b.btn+"_2").html(c+" "+f);$("#"+b.placeBidSectionId+b.btn+"_3").html(c+" "+g)}var h=this.showOnlyTwoButtons("#"+b.placeBidSectionId+b.btn);14==this.variant?h?$(".bidSecTabWrap .wholeWrap .btnsWrap").addClass("twoBtn"):$(".bidSecTabWrap .wholeWrap .btnsWrap").removeClass("twoBtn"):h?$("#"+b.placeBidSectionId+b.btn+ "_3").css({display:"none"}):$("#"+b.placeBidSectionId+b.btn+"_3").css({display:"inline-block"});$("#"+b.placeBidSectionId+b.btn+"_1"+b.value).val(a.PowerBidVal1.CleanAmount);$("#"+b.placeBidSectionId+b.btn+"_2"+b.value).val(a.PowerBidVal2.CleanAmount);$("#"+b.placeBidSectionId+b.btn+"_3"+b.value).val(a.PowerBidVal3.CleanAmount);14==this.variant?a.LocalCurrentPrice&&(h?($("#"+b.placeBidSectionId+b.approx+"_1").html(a.PowerBidVal1Local.MoneyStandard),$("#"+b.placeBidSectionId+b.approx+"_2").html(a.PowerBidVal2Local.MoneyStandard)): ($("#"+b.placeBidSectionId+b.approx+"_1").html(a.PowerBidVal1Local.MoneyStandard),$("#"+b.placeBidSectionId+b.approx+"_2").html(a.PowerBidVal2Local.MoneyStandard),$("#"+b.placeBidSectionId+b.approx+"_3").html(a.PowerBidVal3Local.MoneyStandard))):a.MinimumToBidLocal&&(h?($("#"+b.placeBidSectionId+b.approx+"_4").html(a.PowerBidVal1Local.MoneyStandard),$("#"+b.placeBidSectionId+b.approx+"_5").html(a.PowerBidVal2Local.MoneyStandard),$("#"+b.placeBidSectionId+b.approx+"_3btn").hide(),$("#"+b.placeBidSectionId+ b.approx+"_2btn").show()):($("#"+b.placeBidSectionId+b.approx+"_1").html(a.PowerBidVal1Local.MoneyStandard),$("#"+b.placeBidSectionId+b.approx+"_2").html(a.PowerBidVal2Local.MoneyStandard),$("#"+b.placeBidSectionId+b.approx+"_3").html(a.PowerBidVal3Local.MoneyStandard),$("#"+b.placeBidSectionId+b.approx+"_2btn").hide(),$("#"+b.placeBidSectionId+b.approx+"_3btn").show()))}catch(i){}},updateEbaySectionTxt:function(a,b){var c=this.cfg,d,e;e=(d=this.BidderStatus.valueOf(a.ViewerItemRelation))&&d===this.BidderStatus.HIGHBIDDER; isOutBidder=d&&d===this.BidderStatus.OUTBIDDER;isError=a.Error;if(2==this.variant)b?($("#"+c.ebayBidSectionId+c.txt1).hide(),$("#"+c.ebayBidSectionId+c.txt2).show(),this.showOrHideEle([c.preBidId+c.wrapper],!1),this.showOrHideEle([c.placeBidSectionId,c.seperatorId],!0)):(e&&($("#"+c.ebayBidSectionId+c.txt1).show(),$("#"+c.ebayBidSectionId+c.txt2).show(),this.showOrHideEle([c.preBidId+c.wrapper],!0)),this.showOrHideEle([c.placeBidSectionId,c.seperatorId],!1));else if(6==this.variant||7==this.variant|| 8==this.variant||9==this.variant)b?($("#"+c.ebayBidSectionId+c.txt0).hide(),$("#"+c.ebayBidSectionId+c.txt1).hide(),$("#"+c.ebayBidSectionId+c.txt2).show(),$("#"+c.ebayBidSectionId+c.txt1_btn).hide(),$("#"+c.ebayBidSectionId+c.txt2_btn).show(),this.showOrHideEle([c.preBidId+c.wrapper],!1),this.showOrHideEle([c.placeBidSectionId,c.seperatorId],!0)):(e&&($("#"+c.ebayBidSectionId+c.txt0).show(),$("#"+c.ebayBidSectionId+c.txt2).hide(),$("#"+c.ebayBidSectionId+c.txt1).show(),$("#"+c.ebayBidSectionId+c.txt2_btn).hide(), $("#"+c.ebayBidSectionId+c.txt1_btn).show()),this.showOrHideEle([c.placeBidSectionId,c.seperatorId],!1));else if(10==this.variant||11==this.variant||12==this.variant||13==this.variant||14==this.variant)b?(10==this.variant||13==this.variant||14==this.variant?($("#vi_oly_powerBid .V"+this.variant+" .placeBidSectionTr").find("td:first").removeClass("placebidsec_pdn_hb").addClass("placebidsec_pdn_ob"),$("#vi_oly_powerBid .V"+this.variant+" .ebayBidSectionCnt").removeClass("ebaybidsec_pdn_hb").addClass("ebaybidsec_pdn_ob")): ($("#vi_oly_powerBid .V"+this.variant+" .placeBidSectionTr").find("td:first").removeClass("placebidsec_pdn_hb_rev").addClass("placebidsec_pdn_ob_rev"),$("#vi_oly_powerBid .V"+this.variant+" .ebayBidSectionCnt").removeClass("ebaybidsec_pdn_hb_rev").addClass("ebaybidsec_pdn_ob_rev")),14!=this.variant&&$("#vi_oly_powerBid .V"+this.variant+" .inpWrap").css({margin:"10px"}),$("#"+c.placeBidSectionId+c.txt_gamf_1+"_1").removeClass("ttl1_hb").addClass("ttl1"),$("#"+c.highBidTopSectionId).hide(),14!=this.variant&& ($("#"+c.placeBidSectionId+c.txt0).hide(),$("#"+c.seperatorId+c.txt0).hide(),$("#"+c.ebayBidSectionId+c.txt1).hide(),$("#"+c.ebayBidSectionId+c.txt2).show(),$("#"+c.ebayBidSectionId+c.txt1_btn).hide()),$("#"+c.ebayBidSectionId+c.txt2_btn).show(),this.showOrHideEle([c.preBidId+c.wrapper],!1),this.showOrHideEle([c.placeBidSectionId,c.seperatorId],!0)):e?(10==this.variant||13==this.variant||14==this.variant?($("#vi_oly_powerBid .V"+this.variant+" .placeBidSectionTr").find("td:first").removeClass("placebidsec_pdn_ob").addClass("placebidsec_pdn_hb"), $("#vi_oly_powerBid .V"+this.variant+" .ebayBidSectionCnt").removeClass("ebaybidsec_pdn_ob").addClass("ebaybidsec_pdn_hb")):($("#vi_oly_powerBid .V"+this.variant+" .placeBidSectionTr").find("td:first").removeClass("placebidsec_pdn_ob_rev").addClass("placebidsec_pdn_hb_rev"),$("#vi_oly_powerBid .V"+this.variant+" .ebayBidSectionCnt").removeClass("ebaybidsec_pdn_ob_rev").addClass("ebaybidsec_pdn_hb_rev")),$("#"+c.placeBidSectionId+c.txt_gamf_1+"_1").removeClass("ttl1").addClass("ttl1_hb"),$(".hb_or").hide(), $("#"+c.seperatorId).hide(),14==this.variant?($("#"+c.highBidTopSectionId).show(),this.showOrHideEle([c.seperatorId],!1),this.showOrHideEle([c.placeBidSectionId],!1)):($("#"+c.ebayBidSectionId+c.txt2).hide(),$("#"+c.ebayBidSectionId+c.txt2_btn).hide(),$("#"+c.highBidTopSectionId).show(),this.showOrHideEle([c.seperatorId],!1),this.showOrHideEle([c.placeBidSectionId],!1),$("#"+c.ebayBidSectionId+c.txt1).show(),$("#"+c.ebayBidSectionId+c.txt1_btn).show())):($("#"+c.highBidTopSectionId).hide(),this.showOrHideEle([c.seperatorId], !0),this.showOrHideEle([c.placeBidSectionId],!0))},updateBidCount:function(a){var b=this.cfg;14==this.variant?1==a.BidCount?$("#"+b.bidCountId+b.value).html(b.bidCountDynTxt.replace("##2##",a.BidCount)):$("#"+b.bidCountId+b.value).html(b.bidsCountDynTxt.replace("##2##",a.BidCount)):(1==a.BidCount?$("#"+b.belowBidsTxtId).html(b.belowBidTxt):$("#"+b.belowBidsTxtId).html(b.belowBidsTxt),$("#"+this.cfg.bidCountId+b.value).html(a.BidCount))},defaultFields:function(a){var b;b=a.isAutoRefresh&&!a.TimeLeft? this.bidUtil.timeLeftV({}):this.bidUtil.timeLeftV(a.TimeLeft);this.updateBidCount(a);this.updateTimeLeft(b);i.superclass.startCounter.apply(this,[b,a.AccessedDate,a.ViewerItemRelation]);this.callFromPage&&(this.updateScope(a),this.updateShipping());this.updateCurrBid(a.CurrentPrice,a.LocalCurrentPrice);this.updateSymbol(a)},updateScope:function(a){var b=this.cfg;a&&a.LocalCurrentPrice?(this.addRemoveClasses($("#"+b.layerWrapper),[],["ap"]),this.addRemoveClasses($("#"+b.layerWrapper+" .topWrap tr.approxTr"), ["dn"],[])):(this.addRemoveClasses($("#"+b.layerWrapper),["ap"],[]),this.addRemoveClasses($("#"+b.layerWrapper+" .topWrap tr.approxTr"),[],["dn"]));this.impCharge&&((impChTxt=$("#"+this.impCharge).css("display"))&&"none"!=impChTxt?(this.cfg.isGsp=!0,this.addRemoveClasses($("#"+b.layerWrapper),[],["ic"])):(this.cfg.isGsp=!1,this.addRemoveClasses($("#"+b.layerWrapper),["ic"],[])))},updateSymbol:function(a){var b=this.cfg;a&&(a.MinimumToBid&&a.MinimumToBid.CurrencySymbol)&&$("#"+b.ebayBidSectionId+"_symb").html(a.MinimumToBid.CurrencySymbol)}, updateImportCharge:function(a){var b=this.cfg,c=$("#"+this.impCharge).css("display");this.cfg.isGsp&&(a?(a=raptor.require("com.ebay.raptor.vi.shipping.CalculateImportCharge"),14==this.variant?new a({maxBidAmt:this.maxBidAmt,calcImportChargeUrl:b.calcImportChargeUrl,calculateOnLoad:!0}):($("#"+b.impChId+"_topPIC"+b.wrapper).hide(),c=$("#"+b.defaultImpChargeTxt).html(),$("#"+b.impChBidTxtId+b.value).hide(),$("#"+b.impChBidTxtId+b.value+"Err").hide(),this.util.displayContent(b.impChId,c,b.value,b.wrapper), new a({impChIdLink:b.impChId+"Lnk",maxBidAmt:this.maxBidAmt,impChIdCnt:b.impChId+b.value,calcImportChargeUrl:b.calcImportChargeUrl,impChBidTxtId:b.impChBidTxtId+b.value}))):($("#"+b.impChId+b.wrapper).hide(),this.impCharge?((c=$("#"+this.impCharge+" #impchCost ").html())&&""!=c?14==this.variant?$("#"+b.impChId+"_topPIC"+b.value).html($("#"+b.aprroxTopICId).html().replace("##2##",c)):($("#"+b.impChId+"_topPIC"+b.value).html(c),$("#"+b.impChBidTxtId+"_topPIC"+b.value).show()):($("#"+b.impChId+"_topPIC"+ b.value).hide(),14!=this.variant&&$("#"+b.impChBidTxtId+"_topPIC"+b.value).hide(),$("#"+b.impChId+"_topPICErr").show()),$("#"+b.impChId+"_topPIC"+b.wrapper).show()):$("#"+b.impChId+"_topPIC"+b.wrapper).hide()))},isFreeShipping:function(){var a=this.cfg;return 0<$(".sh-CostBB").size()&&$(".sh-CostBB").html()==a.freeShipLabel?!0:!1},updateShipping:function(){var a=this.cfg,b=this.shipping;b?($("#"+a.layerWrapper).removeClass("sErr"),a.shippingId&&b&&($("#"+a.olyId+" .dummy").html(b),(b=$("#"+a.olyId+ " .dummy span:first-child").html())&&(14==this.variant?this.isFreeShipping()?$("#"+a.shippingId+a.value).html($("#"+a.freeShippingNewId).html()):$("#"+a.shippingId+a.value).html($("#"+a.shipAmtNewId).html().replace("##2##",b)):6==this.variant?this.isFreeShipping()?$("#"+a.shippingId+a.value).html(a.freeTxt):$("#"+a.shippingId+a.value).html(b):$("#"+a.shippingId+a.value).html(b)),(b=$("#"+a.olyId+" .dummy"))&&b.find("#convetedPriceId").html()?14==this.variant?$("#"+a.shippingId+a.approx).html(this.appendApproxTxt(b.find("#convetedPriceId").html())): $("#"+a.shippingId+a.approx).html(b.find("#convetedPriceId").html()):14==this.variant&&$("#"+a.layerWrapper+" .shipApproxTop").hide(),$("#"+a.shippingId+a.wrapper).show())):(b=14==this.variant?$("#"+a.defaultShpTxtNew).html():$("#"+a.defaultShpTxt).html(),$("#"+a.shippingId+a.value).html(b),$("#"+a.layerWrapper).addClass("sErr"),14==this.variant?$("#"+a.layerWrapper+" .shipApproxTop").hide():$("#"+a.shippingId+"_acc_approx").hide())},updateTimeLeft:function(a,b){var c=this.cfg,d="";$("#"+c.timeLeftId+ c.value).removeClass(c.lessTimeCss);$("#"+c.timeLeftId+c.value).removeClass("medHotRedTime");$("#"+c.timeLeftId+c.value).removeClass("hotRedTime");a&&(formatCfg={dayTxt:c.dayTxt,dayCharTxt:c.dayCharTxt,hourTxt:c.hourTxt,hoursTxt:c.hoursTxt,hourCharTxt:c.hourCharTxt,minuteCharTxt:c.minuteCharTxt,secondCharTxt:c.secondCharTxt,cssElemId:c.timeLeftId+c.value,css:c.lessTimeCss},3>a.hour&&(formatCfg.css="medHotRedTime",1>a.hour&&(formatCfg.css="hotRedTime")),d=this.bidUtil.timeLeftFormat(a,formatCfg,!1, c.enableAFAlways),14==this.variant&&(d=c.timeLeftDynTxt.replace("##2##",d)),b?this.util.displayContent(c.timeLeftId,d,c.value):this.util.displayContent(c.timeLeftId,d,c.value,c.wrapper),this.pubsub=raptor.require("pubsub"),c.isAccessibilityOffScreenTimerOn&&this.pubsub.publish("OFFSCREEN_BID",{timerId:"offscreenTimerLayer",isOffScreenOnBidLayer:1,insertionPoint:$(".bidWrap"),timeLeft:a,sourceOfTimer:$(".timeLeftVal")}))},updateMaximumBid:function(a,b){var c=this.cfg;bidderStatus=this.BidderStatus.valueOf(a.ViewerItemRelation); if(b&&a&&a.MaximumBid){if(14==this.variant)$("#"+c.ebayBidSectionId+"_currMax"+c.value).html(a.MaximumBid.MoneyStandard);else{var d=a.MaximumBid.MoneyStandard,e=d.indexOf(a.MaximumBid.CleanAmount),d=d.substring(0,e);$("#"+c.ebayBidSectionId+"_currMax"+c.value).html(a.MaximumBid.MoneyStandard);$("#"+c.ebayBidSectionId+"_currMax"+c.value+"1").html(d);$("#"+c.ebayBidSectionId+"_currMax"+c.value+"2").html(a.MaximumBid.CleanAmount)}a.MaximumBidLocal&&(14==this.variant?$("#"+c.ebayBidSectionId+"_currMax"+ c.value+c.approx).html($("#"+c.approxAmtNewId).html().replace("##2##",a.MaximumBidLocal.MoneyStandard)):$("#"+c.ebayBidSectionId+"_currMax"+c.value+c.approx).html(a.MaximumBidLocal.MoneyStandard));$("#"+c.ebayBidSectionId+"_currMax").show()}else $("#"+c.ebayBidSectionId+"_currMax").hide()},updateMinToBid:function(a){this.BidderStatus.valueOf(a.ViewerItemRelation)===this.BidderStatus.HIGHBIDDER?$(".minToBid_14").show():$(".minToBid_14").hide()},updateMinToBidOld:function(a,b){var c=this.cfg,d="",e, f=this.BidderStatus.valueOf(a.ViewerItemRelation),g=a.MaximumBid,h=a.MinimumToBid,f=f===this.BidderStatus.HIGHBIDDER;if(!a.IsAdminView){if(a.isAutoRefresh&&f&&g&&h&&this.amountUtils.parseCurrencyByCleanAmt(h.CleanAmount)>this.amountUtils.parseCurrencyByCleanAmt(g.CleanAmount))e=14==this.variant?c.minToBidHBDynTxtId:c.minBidHBTxt,d=h.MoneyStandard;else if(g||h)f&&g?(e=14==this.variant?c.minToBidHBDynTxtId:c.minBidHBTxt,d=g.MoneyStandard):h&&(e=14==this.variant?c.minToBidOBDynTxtId:c.minBidTxt,d=h.MoneyStandard); d&&(b||12==this.variant||13==this.variant||14==this.variant)?(14==this.variant?$("#"+c.olyId+" .minToBid_14").html($("#"+e).html().replace("##2##",d)).show():$("#"+c.olyId+" .minimumToBid").html($("#"+e).html().replace(c.dummy,d)).show(),$("#"+c.olyId+" .minToBidWrap").show()):$("#"+c.olyId+" .minToBidWrap").hide()}},updateCurrBid:function(a,b,c){var d=this.cfg;a&&(this.util.displayContent(d.curBidId,a.MoneyStandard,d.value,d.wrapper),c&&$("#"+d.curBidId+d.lable).html(c));this.updateApprox(b,d.curBidId)}, updateApprox:function(a,b){var c=this.cfg,d;a&&(a.MoneyStandard&&b)&&(d=a.MoneyStandard,14==this.variant?$("#"+b+c.approx).html(this.appendApproxTxt(d)).show():$("#"+b+c.approx).html(d).show())},appendApproxTxt:function(a){var b=this.cfg;return a?$("#"+b.approxAmtNewId).html().replace("##2##",a):""},confirmBidMsg:function(a){var b=this.cfg,c=null,d=null,e=-1,f=this.BidderStatus.valueOf(a.ViewerItemRelation);if(f)if(6<=this.variant&&15>this.variant){if(f==this.BidderStatus.OUTBIDDER?(a.OutbidBySmartBid? (a.OutbidByMatchingBid?(c=b.maxbid_OUTBIDDER_BY_MATCHING_BID_1,d=b.maxbid_OUTBIDDER_BY_MATCHING_BID_2):(c=b.maxbid_OUTBIDDER_BY_MAX_BID_1,d=b.maxbid_OUTBIDDER_BY_MAX_BID_2),a.isAutoRefresh||(this.smartOutbid=!0)):(c=b.maxbid_OUTBIDDER_BY_INC_BID_1,d=b.maxbid_OUTBIDDER_BY_INC_BID_2,a.isAutoRefresh||(this.smartOutbid=!1)),this.smartOutbid&&a.isAutoRefresh&&(a.OutbidByMatchingBid?(c=b.maxbid_OUTBIDDER_BY_MATCHING_BID_1,d=b.maxbid_OUTBIDDER_BY_MATCHING_BID_2):(c=b.maxbid_OUTBIDDER_BY_MAX_BID_1,d=b.maxbid_OUTBIDDER_BY_MAX_BID_2)), e=0):f==this.BidderStatus.HIGHBIDDER&&(e=3,a.IsReserve&&!a.IsReserveMet?c=b.HIGHBIDDER_RESERVE_NOT_MET:a.IsFirstBid?c=b.maxbid_HIGHBIDDER_FIRST:a.IsOneMaxBidAway?c=b.HIGHBIDDER_1_MAX_BID_AWAY:this.lessThanHour(a.TimeLeft)?c=b.HIGHBIDDER_60_MIN_LEFT:6<=this.variant&&15>this.variant?a.HighBidderAgain?(c=b.maxbid_HIGHBIDDER_AGAIN_1,d=b.maxbid_HIGHBIDDER_AGAIN_2):c=b.maxbid_HIGHBIDDER_1:c=b.maxbid_HIGHBIDDER_1,this.smartOutbid=!1),c&&-1!==e?(this.updateStatusMsg(e),6<=this.variant&&15>this.variant&&a.HighBidderAgain&& c==b.maxbid_HIGHBIDDER_AGAIN_1?this.displayMsg_maxbid(!0,$("#"+c).html(),null):this.displayMsg_maxbid(!0,$("#"+c).html(),$("#"+d).html())):this.displayMsg(!1),b.bidSmsEnabled&&(6==this.variant||9==this.variant||10==this.variant||11==this.variant||12==this.variant||13==this.variant||7==this.variant&&(f==this.BidderStatus.OUTBIDDER||f==this.BidderStatus.HIGHBIDDER)||8==this.variant&&f==this.BidderStatus.HIGHBIDDER)&&a.BidSmsLayer)a=$.parseJSON(a.BidSmsLayer),a.doNotShowSMSOptIn||($("#"+b.bidSmsId).show(), $("#"+b.bidSmsCollapseId).show(),a.result&&a.result.mobileNumber&&1==a.result.itemEndingSubscription?(c=a.result.mobileNumber,$("#"+b.bidSmsNumId).html(c.substring(c.indexOf("-")+1,c.length)),$("#"+b.bidSmsImgMb).hide(),$("#"+b.bidSmsImgSc).show(),f==this.BidderStatus.HIGHBIDDER?($("#"+b.bidSmsExpId).hide(),$("#"+b.bidSmsRemExpId).hide(),$("#"+b.bidSmsSuccExpId).show()):f==this.BidderStatus.OUTBIDDER&&($("#"+b.bidSmsExpId).hide(),$("#"+b.bidSmsRemExpId).hide(),$("#"+b.bidSmsSuccExpId).hide())):(a.result&& (a.result.mobileNumber&&0==a.result.itemEndingSubscription)&&(c=a.result.mobileNumber,0!=c.length&&(c=c.split("-"),4==c.length&&($("#"+b.bidSmsCty).html("+"+c[0]),$("#"+b.bidSmsCity).val(c[1]),$("#"+b.bidSmsPhone1).val(c[2]),$("#"+b.bidSmsPhone2).val(c[3])))),f==this.BidderStatus.HIGHBIDDER?($("#"+b.bidSmsSuccExpId).hide(),$("#"+b.bidSmsRemExpId).hide(),$("#"+b.bidSmsExpId).show()):f==this.BidderStatus.OUTBIDDER&&($("#"+b.bidSmsExpId).hide(),$("#"+b.bidSmsRemExpId).hide(),$("#"+b.bidSmsSuccExpId).hide()))), a.delayTimeInMinutes&&$("#"+b.bidSmsElapTime).html(a.delayTimeInMinutes),a.countryISDCode&&$("#"+b.bidSmsCty).html("+"+a.countryISDCode)}else f==this.BidderStatus.OUTBIDDER?(a.OutbidBySmartBid?(c=b.OUTBIDDER_BY_SMART_BID,a.isAutoRefresh||(this.smartOutbid=!0)):(c=b.OUTBIDDER,a.isAutoRefresh||(this.smartOutbid=!1)),this.smartOutbid&&a.isAutoRefresh&&(c=b.OUTBIDDER_BY_SMART_BID),e=0):f==this.BidderStatus.HIGHBIDDER&&(e=3,c=a.IsReserve&&!a.IsReserveMet?b.HIGHBIDDER_RESERVE_NOT_MET:a.IsFirstBid?b.HIGHBIDDER_FIRST: a.IsOneMaxBidAway?b.HIGHBIDDER_1_MAX_BID_AWAY:this.lessThanHour(a.TimeLeft)?b.HIGHBIDDER_60_MIN_LEFT:b.HIGHBIDDER,this.smartOutbid=!1),c&&-1!==e?5==this.variant?(this.util.updateStatusMsg(e,this.statusMsg),this.util.displayContent(b.statusMsgId,$("#"+c).html(),b.value,b.wrapper)):(this.updateStatusMsg(e),this.displayMsg(!0,$("#"+c).html())):this.displayMsg(!1)},isRedirectErrors:function(a,b){return a===this.BidError.REDIRECT?(top.location.href=b,!0):a===this.BidError.REFRESH||a===this.BidError.AUCTION_ENDED? (i.superclass.closeLayer.apply(this),!0):!1},updateBidAmtError:function(a,b){var c=this.cfg,d,e=-1;a===this.BidError.DECSEP?(d=c.DECSEP,e=0):a===this.BidError.INVALID_BIDAMOUNT?(d=c.INVALID_BIDAMOUNT,e=0):a===this.BidError.OFFER_AMOUNT_ZERO?(d=c.MIN_BID_ERROR_STATUS,e=0):a===this.BidError.LOW_BIDAMOUNT?(d=6<=this.variant&&15>this.variant?c.maxbid_LOW_BIDAMOUNT:c.LOW_BIDAMOUNT,e=0):a===this.BidError.INVALID_BIDAMOUNT_OF_HIGH_BIDDER?(d=c.INVALID_BIDAMOUNT_OF_HIGH_BIDDER,e=0):a===this.BidError.BUYER_BLOCKED_NO_LINKED_PAYPAL_ACCOUNT? (d=c.BUYER_BLOCKED_NO_LINKED_PAYPAL_ACCOUNT,e=1):a===this.BidError.BID_GREATER_THAN_BIN&&(d=c.BID_GREATER_THAN_BIN,e=1);d&&-1!==e&&(6<=this.variant&&15>this.variant?(this.updateStatusMsg(e),d==c.maxbid_LOW_BIDAMOUNT?this.displayMsg_maxbid(!0,$("#"+d).html()+b.MinimumToBid.MoneyStandard,null):this.displayMsg_maxbid(!0,$("#"+d).html(),null)):(this.updateStatusMsg(e),this.displayMsg(!0,$("#"+d).html())))},throbber:function(a){var b=this.cfg;this.util.showHide([b.loadingId,b.resumeBidId],a);a&&$("#"+ b.resumeBidId+"_ttl").focus()},hideAll:function(a){var b=this.cfg,b=[b.loadingId,b.resumeBidId,b.statusMsgId+b.wrapper,b.disclaimerId,b.disclaimerGspId,b.bidSectionId+b.wrapper,b.reviewSectionId+b.wrapper];this.updateHideArray(a,b);this.util.showHide(b,!1)},updateHideArray:function(a,b){var c=this.cfg;a?b.push(c.topPanelId):14==this.variant&&(b.push(c.topHelpTxtId+"_cnt"),$("#"+c.topHelpTxtId).data("exp","0"))},lessThanHour:function(a){if((a=this.bidUtil.timeLeftV(a))&&!(0=this.variant)c=$("#"+b.placeBidSectionId+b.value).val(),c=this.amountUtils.sanitizeAmt(c)}else 2== a?c=$("#"+b.ebayBidSectionId+b.value).val():3==a&&(c=$("#"+b.reviewSectionId+b.value+"_hdn").val(),c=this.amountUtils.sanitizeAmt(c));return c},getBidValue_gamfc:function(a,b){var c=this.cfg,d;1==a?(d=$("#"+b+c.value).val(),d=this.amountUtils.sanitizeAmt(d)):2==a?d=$("#"+c.ebayBidSectionId+c.value).val():3==a&&(d=$("#"+c.reviewSectionId+c.value+"_hdn").val(),d=this.amountUtils.sanitizeAmt(d));return d},attachEvt:function(a,b,c,d){var e=this,f=e.cfg,g=d?"keypress":"click",h=function(g){var h=!1;if(d){if(13== (g.keyCode?g.keyCode:g.which))h=!0}else h=!0;if(h){if(f.showReviewScreen&&e.status==e.BidStatus.valueOf("CONFIRMBID"))if((10==e.variant||11==e.variant)&&1==b)c=f.quickBidAgainUrl;else if((12!=e.variant||13!=e.variant)&&12!=e.variant&&13!=e.variant)c=f.bidAgainUrl;12==e.variant||13==e.variant||14==e.variant?e.triggerCall(c,e.getBidValue_gamfc(b,a),!0,null):e.triggerCall(c,e.getBidValue(b),!0,null);return!1}};$(".pow").off(g+e.evtNS,"#"+a,h);$(".pow").on(g+e.evtNS,"#"+a,h)},focusHdlr:function(){$("#"+ this.cfg.olyId+" .inpWrap").addClass("inpFocus")},blurHdlr:function(){$("#"+this.cfg.olyId+" .inpWrap").removeClass("inpFocus")},attachTextBoxEvts:function(){var a=this,b=a.cfg,c=function(){a.focusHdlr()},d=function(){a.blurHdlr()},e=function(){a.focusHdlr();$("#"+b.olyId+" .inpWrapSection .inpWrap input").focus();return!1};14==a.variant&&($(".pow").off("click"+a.evtNS,".inpWrapSection .inpWrap",e),$(".pow").on("click"+a.evtNS,".inpWrapSection .inpWrap",e));$(".pow").off("focus"+a.evtNS,".inpWrap .inpVal", c);$(".pow").on("focus"+a.evtNS,".inpWrap .inpVal",c);$(".pow").off("blur"+a.evtNS,".inpWrap .inpVal",d);$(".pow").on("blur"+a.evtNS,".inpWrap .inpVal",d);$(".pow").on("click"+a.evtNS,".inpWrap .symb",function(){$("#"+b.olyId+" .inpWrap .inpVal").focus()})},attachBubbleEvts:function(){var a=this,b=a.cfg,c=function(){2==a.variant&&($("#"+b.rgtBubbleId).show(),$("#"+b.rgtBubbleId+" .closeBut").focus())},d=function(){2==a.variant&&$("#"+b.rgtBubbleId).hide()},e=function(c){var d=c.keyCode?c.keyCode: c.which;c.target&&(13==d?2==a.variant&&"closeBut"==c.target.className&&($("#"+b.rgtBubbleId).hide(),$(".pow #powHlp").focus(),c.preventDefault()):9==d?"closeBut"==c.target.className&&($(".pow .smartBidIns a").focus(),c.preventDefault()):27==d&&($("#"+b.rgtBubbleId).hide(),$(".pow #powHlp").focus(),c.stopPropagation()))};$(".pow").off("click"+a.evtNS,".sh-bubble #powHlp",c);$(".pow").on("click"+a.evtNS,".sh-bubble #powHlp",c);$(".pow").off("click"+a.evtNS,".sh-bubble .hlpOly .closeBut",d);$(".pow").on("click"+ a.evtNS,".sh-bubble .hlpOly .closeBut",d);$(".pow").off("keydown"+a.evtNS," #vi_oly_powHelpRightOly",e);$(".pow").on("keydown"+a.evtNS," #vi_oly_powHelpRightOly",e)},layerCleanUp:function(a,b){$(".pow").off(this.evtNS);this.util&&this.olyCloseHandle&&(this.olyCloseHandle.unsubscribe(),this.olyCloseHandle=null);if(a&&b){var c=this.removeMaxBidParamPowerbid(b);setTimeout(function(){top.location.href=c},1)}},removeMaxBidParamPowerbid:function(a){return i.superclass.removeMaxBidParam.apply(this,arguments)}, attachCloseButtonEvents:function(){var a=this,b=function(){a.pubsub.publish("_CLOSE_OLAY",{cmpId:"powerBid"})};$(".pow").off("click"+a.evtNS,".powClz",b);$(".pow").on("click"+a.evtNS,".powClz",b);b=function(b){13==b.keyCode&&(a.pubsub.publish("_CLOSE_OLAY",{cmpId:"powerBid"}),b.preventDefault())};$(".pow").off("keydown"+a.evtNS,".powClz",b);$(".pow").on("keydown"+a.evtNS,".powClz",b)},subscribeEvents:function(){var a=this.cfg;this.pubsub.subscribe("IMP_CHARGE_RESPONSE",function(b){b&&b.impChCost? $("#"+a.impChId+a.value).html($("#"+a.aprroxTopICId).html().replace("##2##",b.impChCost)):($("#"+a.impChId+a.value).hide(),$("#"+a.impChBidTxtId+a.value+"Err").show())})},attachPowerBidEvts:function(){var a=this.cfg;12==this.variant||13==this.variant||14==this.variant?(this.attachEvt(a.placeBidSectionId+a.btn+"_1",1,a.oneXConfirmUrl),this.attachEvt(a.placeBidSectionId+a.btn+"_2",1,a.twoXConfirmUrl),this.attachEvt(a.placeBidSectionId+a.btn+"_3",1,a.fiveXConfirmUrl)):this.attachEvt(a.placeBidSectionId+ a.btn,1,a.powerBidConfirmURL);2!=this.variant&&14!=this.variant?(this.attachEvt(a.ebayBidSectionId+a.btn+"_tx1",2,a.maxbidUrl),this.attachEvt(a.ebayBidSectionId+a.btn+"_tx2",2,a.maxbidUrl)):this.attachEvt(a.ebayBidSectionId+a.btn,2,a.maxbidUrl);this.attachEvt(a.ebayBidSectionId+a.value,2,a.maxbidUrl,!0);this.attachEvt(a.reviewSectionId+a.btn,3,a.reviewConfirmUrl);this.attachTextBoxEvts();this.attachBubbleEvts();this.olyCloseHandle||i.superclass.subscribeOlyClose.apply(this);14==this.variant&&(this.subscribeEvents(), this.attachHelpTxtEvts())},collapseCnt:function(a){a&&1==$("#"+a).data("exp")&&($("#"+a+"_cnt").slideUp("fast"),$("#"+a).data("exp","0"),$("#"+a).attr("aria-expanded","false"))},expandCnt:function(a){a&&0==$("#"+a).data("exp")&&($("#"+a+"_cnt").slideDown("fast"),$("#"+a).data("exp","1"),$("#"+a).attr("aria-expanded","true"));this.trending_tracked&&!this.trending_tracked_outbid?$(document).trigger("rover",{sid:"p2047675.l9053"}):this.trending_tracked_outbid=!1},attachHelpTxtEvts:function(){var a=this, b=a.cfg,c=function(){var c=$(this)[0].id;c&&(c==b.seeMoreHelpId&&($("#"+b.seeMoreHelpId).data("exp","0"),$("#"+b.seeMoreHelpId).hide()),1==$("#"+c).data("exp")?a.collapseCnt(c):a.expandCnt(c));return!1};$(".pow").off("click"+a.evtNS,"#"+b.topHelpTxtId,c);$(".pow").on("click"+a.evtNS,"#"+b.topHelpTxtId,c);$(".pow").off("click"+a.evtNS,"#"+b.seeMoreHelpId,c);$(".pow").on("click"+a.evtNS,"#"+b.seeMoreHelpId,c)},updateCurrBidColor:function(a,b){var c=this.cfg,d=this.BidderStatus.valueOf(a.ViewerItemRelation); a&&b&&(d&&d===this.BidderStatus.HIGHBIDDER?($("#"+c.curBidId+c.value).removeClass("errCol"),$("#"+c.curBidId+c.value).addClass("sucCol")):d&&d===this.BidderStatus.OUTBIDDER?($("#"+c.curBidId+c.value).removeClass("sucCol"),$("#"+c.curBidId+c.value).addClass("errCol")):($("#"+c.curBidId+c.value).removeClass("sucCol"),$("#"+c.curBidId+c.value).removeClass("errCol")))},valiadteInput:function(a){if(!a||!1==this.hasNumbers(a))return this.invalidBidAmountErr=this.BidError.valueOf("INVALID_BIDAMOUNT"),this.updateBidAmtError(this.invalidBidAmountErr), this.userAction=!1,!0;this.invalidBidAmountErr=null;return!1},hasNumbers:function(a){return a?/\d/g.test(a):!1}};return i});raptor.defineClass("com.ebay.raptor.vi.bid.powerbid.inlineSurvey.inlineSurvey",{},function(){var e=function(a){this.cfg=a;this.initValues();this.subscribeEvents();this.attachSurveyEvents(".inlineFeedback")};e.prototype={initValues:function(){this.pubsub=raptor.require("pubsub");this.submitClicked=this.surveySubmitted=!1},subscribeEvents:function(){var a=this,b=a.cfg;a.pubsub.channel(b.linkId+"Oly").subscribe("_OLY_CLS_SVC",function(){a.submitClicked?($("#"+b.inlineFeedbackId+"_result").show(),$("#"+ b.inlineFeedbackId+"_result").focus()):$("#"+b.linkId).focus();a.submitClicked=!1},a)},attachSurveyEvents:function(a){var b=this,c=b.cfg;$("#"+c.inlineFeedbackId+"_submit").bind("click"+a,function(){var a=c.inlineFeedbackId+"_frm",d=b.getFmDoc(a);d&&(d.open(),d.write('
    '), d.close());b.submitClicked=!0;b.pubsub.publish("_CLOSE_OLAY",{cmpId:c.linkId+"Oly"});b.submitForm(a);$("#powerBidSurvey").hide()});var d=c.defaultTxt;$("#"+c.inlineFeedbackId+"_comments").focus(function(){$(this).val()==d&&$(this).val("")}).blur(function(){""==$(this).val()&&$(this).val(d)});$("#"+c.inlineFeedbackId+"_cancel").bind("click",function(){b.pubsub.publish("_CLOSE_OLAY",{cmpId:c.linkId+"Oly"});$("#"+c.inlineFeedbackId+"_comments").val(d)})},encodePageDom:function(){var a=document.getElementsByTagName("html")[0].innerHTML; return a=encodeURIComponent(""+a+"")},submitForm:function(a){var b=this.cfg,c=b.surveyName;try{iDoc=this.getFmDoc(a),iDoc.getElementById("surveyNameHidden").value=c}catch(d){return}var a=raptor.require("ebay.cookies"),e=this.convertDateToUTC(new Date);iDoc.getElementById("rateHidden").value=$("input[name="+b.inlineFeedbackId+"_radio]:checked").val();iDoc.getElementById("guidHidden").value=a.readCookie("npii","tguid");iDoc.getElementById("surveyDateHidden").value=e;iDoc.getElementById("surveyNameHidden").value= c;iDoc.getElementById("domHidden").value=this.encodePageDom();iDoc.getElementById("pageUrlHidden").value=encodeURIComponent(location.href);b.treatments&&(iDoc.getElementById("treatmentsHidden").value=b.treatments);c=encodeURIComponent($("#"+b.inlineFeedbackId+"_comments").val());c==encodeURIComponent(b.defaultTxt)&&(c="");iDoc.getElementById("userCommentsHidden").value=c;iDoc.getElementById("surveySubmitForm").submit()},convertDateToUTC:function(a){return a.getUTCFullYear()+"-"+a.getUTCMonth()+"-"+ a.getUTCDate()+"-"+a.getUTCHours()+"-"+a.getUTCMinutes()+"-"+a.getUTCSeconds()},getFmDoc:function(a){var b=$("#"+a)[0],c;b.contentDocument?c=b.contentDocument:b.contentWindow?c=b.contentWindow.document:window.frames[a]&&(c=window.frames[a].document);return c},encodePageDom:function(){var a=document.getElementsByTagName("html")[0].innerHTML;return a=encodeURIComponent(""+a+"")}};return e});raptor.defineClass("com.ebay.raptor.vi.PicturePanel.PicturePanelIcons",function(){return{init:function(a){this.pubsub=raptor.require("pubsub");this.registerPubSubEvents(a)},registerPubSubEvents:function(a){this.pubsub.subscribe("UPDATE_PICTURE_RIBBON",function(b){this.makePictureIconsUpdateCall(a,b,!1)},this);this.pubsub.subscribe("RESET_PICTURE_RIBBON",function(){this.makePictureIconsUpdateCall(a,{almostGone:a.defaultCaseHasAlmostGone,lastOne:a.defaultCaseHasLastOne,endingSoon:a.defaultCaseHasEndingSoon, topSelling:a.defaultCaseHasTopSelling,percentOff:a.defaultCaseHasPercentOff,freeShipping:a.defaultCaseHasFreeShipping,bopis:a.defaultCaseHasBOPIS,ebntimer:a.defaultCaseHasEBN},!0)},this)},makePictureIconsUpdateCall:function(a,b,c){b.almostGone||b.lastOne||b.endingSoon||b.topSelling||b.percentOff||b.mskuPercentOff||b.freeShipping||b.bopis||b.ebntimer?(b.almostGone&&($(a.ribbonContentSelector).html(a.almostGoneTxt),$(a.ribbonContentSelector).parent().attr("title",a.almostGoneTxt)),b.lastOne&&($(a.ribbonContentSelector).html(a.lastOneTxt), $(a.ribbonContentSelector).parent().attr("title",a.lastOneTxt)),b.endingSoon&&($(a.ribbonContentSelector).html(a.endingSoonTxt),$(a.ribbonContentSelector).parent().attr("title",a.endingSoonTxt)),b.topSelling&&($(a.ribbonContentSelector).html(a.topSellingTxt),$(a.ribbonContentSelector).parent().attr("title",a.topSellingTxt)),b.percentOff&&($(a.ribbonContentSelector).html(a.percentOffTxt),$(a.ribbonContentSelector).parent().attr("title",a.percentOffTxt)),b.mskuPercentOff&&($(a.ribbonContentSelector).html(b.mskuPercentOff), $(a.ribbonContentSelector).parent().attr("title",b.mskuPercentOff)),b.freeShipping&&($(a.ribbonContentSelector).html(a.freeShippingTxt),$(a.ribbonContentSelector).parent().attr("title",a.freeShippingTxt)),b.almostGone||b.lastOne||b.endingSoon||b.topSelling?$(a.ribbonContentSelector).parent().addClass(a.lastOneClass):a.lastOneClass&&$(a.ribbonContentSelector).parent().removeClass(a.lastOneClass),!b.bopis&&!b.ebntimer?($(a.pictureIconSel).removeClass(a.bopisClass),$(a.pictureIconSel).removeClass(a.ebnTimerClass), $(a.ebnContentSelector).addClass("u-dspn")):($(a.pictureIconSel).addClass(a.bopisClass),$(a.ebnContentSelector).addClass("u-dspn"),b.ebntimer&&($(a.pictureIconSel).addClass(a.ebnTimerClass),$(a.ebnContentSelector).removeClass("u-dspn"))),$(a.ribbonContainerSel).show(),$(a.ribbonContentSelector).parent().show()):c?($(a.ribbonContainerSel).hide(),$(a.ribbonContentSelector).parent().hide()):this.makePictureIconsUpdateCall(a,{almostGone:a.defaultCaseHasAlmostGone,lastOne:a.defaultCaseHasLastOne,endingSoon:a.defaultCaseHasEndingSoon, topSelling:a.defaultCaseHasTopSelling,percentOff:a.defaultCaseHasPercentOff,freeShipping:a.defaultCaseHasFreeShipping,bopis:a.defaultCaseHasBOPIS,ebntimer:a.defaultCaseHasEBN},!0)}}});raptor.defineClass("raptor.merch.MerchManager",function(){return{init:function(a){var b=this;b.m=a;b.url=a.url;b.pubsub=raptor.require("pubsub");b.pubsub.subscribe("MERCH_RE_TRIGGER",function(a){b.trigger(a)},this);b.profiler=raptor.require("ebay.profiler.Profiler");b.sbfFlagValue=raptor.require("ebay.cookies").getBitFlag(raptor.require("ebay.cookies").readCookie("ebay","sbf"),20);b.customCallbackHandler?b.pubsub.subscribe("MERCH_INIT",function(){b.sendUrl()},this):b.m.enableOnScroll?(b.scrollHandler= function(){b.callMerchOnScroll()},$(window).bind("scroll",b.scrollHandler)):$(document).ready(function(){window.setTimeout(function(){b.sendUrl()},0)})},trigger:function(a){this.m=a;this.url=a.url;this.sendUrl()},callMerchOnScroll:function(){var a=this.m.pids,b=this.m.th,c=$(window).scrollTop(),a=$("#merch_html_"+a[0]);if(!("undefined"==typeof a||null==a))if(a=a.offset(),!("undefined"==typeof a||null==a)){var a=a.top,d=$(window).height();a<=c+d+b&&this.sendUrl()}},sendUrl:function(){var a=this.url, b=encodeURIComponent(window.location.href);this.startTime=(new Date).getTime();b=b.replace(/'/g,"%27");if(a+="&srcUrl="+b)this.getJson(a),this.m.enableOnScroll&&$(window).unbind("scroll",this.scrollHandler)},getJson:function(a){var b=this;window.merchCallBack=function(a){b.render(a)};b.m.loadJsAsync?b.loadJSAsync(a+"&callback=parent.window.merchCallBack"):$.getJSON(a+"&callback=?",function(a){b.render(a)},b)},render:function(a){var b=this.m.merchRaptorEnabled?a:a.data.map;if(this.customCallbackHandler)this.pubsub.publish("MERCH_RESPONSE", {data:a});else for(var c in b)if(a=b[c]){var d=document.getElementById("merch_html_"+c);d&&("undefined"!=typeof a.html&&""!=a.html)&&(this.loadCss(a.cssUrl),d.style.display="none",d.innerHTML=a.html,d.style.display="block",this.loadJs(a.jsUrl),this.executeScripts(a.html))}this.setSBFFlag();a=(new Date).getTime()-this.startTime;"undefined"!=typeof oGaugeInfo&&this.profiler.addParam("i_5i",a)},executeScripts:function(a){for(var b,c=/([\s\S]*?)<\/script>/ig;b=c.exec(a);)if(b=b[1]){var d= this.getHead(),e=this.createScript();e.type="text/javascript";e.text=b;d.appendChild(e)}},setSBFFlag:function(){if(this.sbfFlagValue){var a=raptor.require("ebay.cookies").setBitFlag(raptor.require("ebay.cookies").readCookie("ebay","sbf"),20,this.sbfFlagValue);raptor.require("ebay.cookies").writeCookielet("ebay","sbf",a)}},getHead:function(){return document.getElementsByTagName("head")[0]},createScript:function(){return document.createElement("script")},loadJSAsync:function(a){var b=document.createElement("iframe"); (b.frameElement||b).style.cssText="width: 0; height: 0; border: 0";(b.frameElement||b).src="javascript:false";var c=document.getElementsByTagName("script"),c=c[c.length-1];c.parentNode.insertBefore(b,c);b=b.contentWindow.document;b.open().write("");b.close()},loadCss:function(a){if(!("undefined"===typeof a||!a||0===a.length))for(var b=0;b").attr({type:"text/css", rel:"stylesheet",href:a[b]}))},loadJs:function(a){if(!("undefined"===typeof a||!a||0===a.length))for(var b=0;b');b.close()})})();define("raptor/domProxy",["raptor"],function(h,i){var c=function(a){if("string"===typeof a){var b=a,a=document.getElementById(b);if(!a)throw h.createError(Error('Target element not found: "'+b+'"'));}return a},d=function(a){var b=i.find("raptor/pubsub");b&&b.publish("dom/beforeRemove",{el:a})},e={forEachChildEl:function(a,b,c){e.forEachChild(a,b,c,1)},forEachChild:function(a,b,c,g){if(a)for(var d=0,a=a.childNodes,e=a.length;dd?(b=b.substr(0,d)+"...",$("#lhdr-ttl a.lhdr-ttl-main").html(decodeURIComponent(b))):$("#lhdr-ttl a.lhdr-ttl-main").html($("#vi-lkhdr-itmTitl").html());b=55;c.isGeo&&(b=30);d=a.getCutoffThreshold(b,f);f.length>d?(f=f.substr(0,d)+"...",$("#lhdr-ttl a.lhdr-ttl-ellip").html(decodeURIComponent(f))): $("#lhdr-ttl a.lhdr-ellip-main").html($("#vi-lkhdr-itmTitl").html())}catch(i){}try{if(a.conf.isMSKU&&-1!=a.conf.itemVariationsModel.selectedVariationId){var h=a.conf.itemVariationsModel.selectedVariationId;a.conf.itemVariationsModel.itemVariationsMap[h].varationInCart&&a.handleAddedToCartLink({toHide:!1});a.conf.itemVariationsModel.itemVariationsMap[h].variationWatched&&a.handleWatchLinkClick({display:!0})}}catch(j){}})}},getCutoffThreshold:function(c,a){var e=c,b=a.split("%");return e+=2*b.length}, updateTimeLeft:function(c,a){$("#"+this.conf.lkTimeLeftId).html(c);$("#"+this.conf.lkTimeLeftId).attr("class",a)},positionLkdhdrContent:function(){var c=$("#TopPanelDF").position().left;this.lkdHdr.css("padding-left",c+"px");var a=100-100*c/$(document).width();$("#"+this.conf.lockedHeaderId+" table").width(a+"%");$("#"+this.conf.buttonsCntrId).css("padding-right",c+"px")},scrollToTop:function(){$("html, body").animate({scrollTop:0},300);return!1},handleWatchLinkClick:function(c){c.display?($(this.conf.lkAddToWatchListBtnId).hide(), $(this.conf.lkAddToWatchListAddedBtnId).show(),$("#lhdr-tick-icon").addClass("lhdr-tick-icon"),0<$("#vi-lkdhdr-cart-btn").length&&"none"!=$("#vi-lkdhdr-cart-btn").parent().css("display")?$("#lhdr-tick-icon").css("top","8px"):$("#lhdr-tick-icon").css("top","0px")):($(this.conf.lkAddToWatchListAddedBtnId).hide(),$("#lhdr-tick-icon").removeClass("lhdr-tick-icon"),$(this.conf.lkAddToWatchListBtnId).show())},handleAddedToCartLink:function(c){c.toHide?($(this.conf.lkAddedToCartlnkId).parent().removeClass("lhdr-tick-icon"), $(this.conf.lkAddedToCartlnkId).hide(),$(this.conf.lkAddToCartBtnId).parent().show()):($(this.conf.lkAddToCartBtnId).parent().hide(),$(this.conf.lkAddedToCartlnkId).show(),$(this.conf.lkAddedToCartlnkId).parent().addClass("lhdr-tick-icon"))},showHide:function(){var c=$(window).scrollTop()+8,a=$(this.conf.tabId).offset().top;0>a&&(a=9);$("#pse-pdfview-main-wrapper").is(":visible")?(this.lkdHdr.stop(!0,!0).fadeOut(),this.pubsub.publish("_LKHR_FADE_OUT",{}),this.open=!1,0=a&&!this.open?(this.open=!0,this.pubsub.publish("SHOW_BROWSE_TRIGGER",{}),this.lkdHdr.stop(!0,!0).fadeIn(),this.updateItemInfo(),0"+c+"":""}}});(function(c){function m(a){this.$element=c(a);this.original_text=this.$element.html();this.settings=c.extend({},c.fn.trunk8.defaults)}function n(){var a=this.data("trunk8"),d=a.settings,b=d.width,o=d.side,g=d.fill,h=f.getLineHeight(this)*d.lines,a=a.original_text,j=a.length,i="",e,l,k;this.html(a);if(b===p.auto){if(!(this.height()<=h)){b=0;for(e=j-1;b<=e;)l=b+(e-b>>1),k=f.eatStr(a,o,j-l,g),this.html(k),this.height()>h?e=l-1:(b=l+1,i=i.length>k.length?i:k);this.html("");this.html(i);d.tooltip&&this.attr("title", a)}}else isNaN(b)?c.error('Invalid width "'+b+'".'):(k=f.eatStr(a,o,j-b,g),this.html(k),d.tooltip&&this.attr("title",a))}var e,f,p={auto:"auto"};m.prototype.updateSettings=function(a){this.settings=c.extend(this.settings,a)};e={init:function(a){return this.each(function(){var d=c(this),b=d.data("trunk8");b||d.data("trunk8",b=new m(this));b.updateSettings(a);n.call(d)})},update:function(a){return this.each(function(){var d=c(this);a&&(d.data("trunk8").original_text=a);n.call(d)})},revert:function(){return this.each(function(){var a= c(this).data("trunk8").original_text;c(this).html(a)})},getSettings:function(){return this.get(0).data("trunk8").settings}};f={eatStr:function(a,d,b,e){var g=a.length,h=f.eatStr.generateKey.apply(null,arguments),j,i;if(f.eatStr.cache[h])return f.eatStr.cache[h];("string"!==typeof a||0===g)&&c.error('Invalid source string "'+a+'".');if(0>b||b>g)c.error('Invalid bite size "'+b+'".');else if(0===b)return a;"string"!==typeof(e+"")&&c.error("Fill unable to be converted to a string.");switch(d){case "right":return f.eatStr.cache[h]= c.trim(a.substr(0,g-b))+e;case "left":return f.eatStr.cache[h]=e+c.trim(a.substr(b));case "center":return j=g>>1,i=b>>1,f.eatStr.cache[h]=c.trim(f.eatStr(a.substr(0,g-j),"right",b-i,""))+e+c.trim(f.eatStr(a.substr(g-j),"left",i,""));default:c.error('Invalid side "'+d+'".')}},getLineHeight:function(a){var a=c(a),d=a.css("float"),b=a.css("position"),f=a.html(),e;"none"!==d&&a.css("float","none");"absolute"===b&&a.css("position","static");a.html("i").wrap('
    ');e=c("#line-height-test").innerHeight(); a.html(f).css({"float":d,position:b}).unwrap();return e}};f.eatStr.cache={};f.eatStr.generateKey=function(){return Array.prototype.join.call(arguments,"")};c.fn.trunk8=function(a){if(e[a])return e[a].apply(this,Array.prototype.slice.call(arguments,1));if("object"===typeof a||!a)return e.init.apply(this,arguments);c.error("Method "+a+" does not exist on jQuery.trunk8")};c.fn.trunk8.defaults={fill:"…",lines:1,side:"right",tooltip:!0,width:p.auto}})(jQuery);raptor.defineClass("com.ebay.raptor.vi.reviews.ProductReviewRedesignV2",function(){return{init:function(c){function b(){i=null;var a=$(".rvws_container"),b=a.offset().top,a=a.height(),n=$(document).scrollTop();if(!f&&n+500>b)f=!0,g=(new Date).getTime(),$(".ebay-review-section").each(function(a,c){h.push($(c).attr("id").split("_")[1])}),h=h&&h.join(",");else if(f&&(n>b+a||n+500'+c.readFullReviewTxt+"…",tooltip:!1,lines:5});$(".show-full-review-link").on("click",function(){var e=$(this),b=a.getPosition(e),e=e.closest(".ebay-review-section"),n=-1,d="",k=e.attr("class").split(" ");try{n=e.attr("id").split("_")[1],d=Array.isArray(k)&&(~k.indexOf("topFavorable")?"favorable":~k.indexOf("topCritical")? "critical":"")}catch(f){}$(document).trigger("rover",{sid:"p2047675.m3946.l7021",position:b,rvwid:n,listingid:c.itemId,type:d});$(this).parent().trunk8("revert");return!1});$(".ebay-review-section").on("click",".vote-up-link",function(){var e=$(this),b=e.data("value"),d="p2047675.m3946.l7023",f=a.getPosition($(this)),k=e.closest(".ebay-review-section"),g="",j=k.attr("class").split(" "),l=-1;try{l=k.attr("id").split("_")[1],g=Array.isArray(j)&&(~j.indexOf("topFavorable")?"favorable":~j.indexOf("topCritical")? "critical":"")}catch(i){}"cancel"===b&&(d="p2047675.m3946.l7029");$(document).trigger("rover",{sid:d,listingid:c.itemId,position:f,rvwid:l,type:g});a.call("vote",b,e,"?action="+b,c)});$(".ebay-review-section").on("click",".vote-down-link",function(){var b=$(this),d=b.data("value"),f="p2047675.m3946.l7024",g=a.getPosition($(this)),k=b.closest(".ebay-review-section"),i="",j=k.attr("class").split(" "),l=-1;try{l=k.attr("id").split("_")[1],i=Array.isArray(j)&&(~j.indexOf("topFavorable")?"favorable":~j.indexOf("topCritical")? "critical":"")}catch(h){}"cancel"===d&&(f="p2047675.m3946.l7030");$(document).trigger("rover",{sid:f,listingid:c.itemId,position:g,rvwid:l,type:i});a.call("vote",d,b,"?action="+d,c)});$(".ebay-review-section").on("click",".report-spam-link",function(){var b=$(this),d=b.data("value"),f=b.parent(),g="p2047675.m3946.l7025",i=a.getPosition($(this)),h=b.closest(".ebay-review-section"),j="",l=h.attr("class").split(" "),m=-1;try{m=h.attr("id").split("_")[1],j=Array.isArray(l)&&(~l.indexOf("topFavorable")? "favorable":~l.indexOf("topCritical")?"critical":"")}catch(o){}"cancel"===d&&(g="p2047675.m3946.l7028");$(document).trigger("rover",{sid:g,listingid:c.itemId,position:i,rvwid:m,type:j});"report"===d?a.isUserLoggedIn(c)?(f.addClass("marked-inapp"),f.append($(".inapp-spam-overlay")),$(".inapp-spam-overlay").show(),b.closest(".ebay-review-section").addClass("ghosted"),$("#reviewsSection").on("click",".inapp-reasons-list input",function(){$(".inapp-action input").removeClass("disabled")})):window.location= a.getSigninUrl(c):a.call("flag",d,b,"?action=cancel",c)});$(".inapp-spam-overlay").on("click",".overlay-close",function(){a.handleCancelReportSpam($(this))});$(".inapp-success-overlay").on("click",".overlay-close",function(){$(".inapp-success-overlay").hide()});$(".inapp-spam-overlay").on("click",".inapp-action a",function(){a.handleCancelReportSpam($(this))});$(".inapp-spam-overlay").on("click",".inapp-action input",function(){a.handleSubmitReportSpam($(this),c)});$(document).on("updateUserSiginStatus", function(a,b){b&&b.signin&&(c.isUserSignedIn=!0,c.username=b.username)})},getPosition:function(c){return $(".ebay-review-section").index(c.closest(".ebay-review-section"))+1},handleCancelReportSpam:function(c){c.closest(".marked-inapp").removeClass("marked-inapp");c.closest(".ebay-review-section").removeClass("ghosted");$(".inapp-action input").addClass("disabled");$(".inapp-spam-overlay").hide();$(".inapp-reasons-list").find("input").attr("checked",!1)},handleSubmitReportSpam:function(c,b){var a= c.closest(".ebay-review-section"),d=a.find(".inapp-reasons-list").find("input:checked"),a=a.find(".report-spam-link");this.call("flag",d.val(),a,"?action=inappropriate&reason="+d.val(),b)},isUserLoggedIn:function(c){var b=raptor.require("ebay.cookies"),a=raptor.require("Base64"),d=!1;null!==b&&(void 0!==b&&null!=c)&&(b=b.readCookie("dp1","u1p"),a=a.decode(decodeURIComponent(b)),b=c.username,d=c.isUserSignedIn&&""!=a&&a===b);return d},getSigninUrl:function(c){return"https://signin."+c.currentDomain+ "/ws/eBayISAPI.dll?SignIn&ru="+encodeURIComponent(document.URL)},call:function(c,b,a,d,f){var m=f.cosgrcEndpoint,g=a.closest(".ebay-review-section");if(this.isUserLoggedIn(f)){if(""!==m){var h=g.attr("id").split("_")[1];ebay.client.ajax.execute("POST",m+"/review/"+h+"/"+c+d,{timeout:3E3,clientid:"urwwidget",dataType:"json",headers:{"Content-Type":"application/json",Accept:"application/json","x-ebay-c-marketplace-id":f.marketplaceid}},function(d,f){switch(c){case "vote":if("cancel"===b){a.data("value", a.hasClass("vote-up-link")?"up":"down");var e=a.hasClass("vote-up-link")?"voted-up":"voted-down";a.closest("div").removeClass(e)}else"down"===b?(a.closest("div").addClass("voted-down"),a.data("value","cancel"),e=g.find(".vote-up-link"),"cancel"===e.data("value")&&(e.data("value","up"),e.closest("div").removeClass("voted-up"))):(a.data("value","cancel"),a.closest("div").addClass("voted-up"),e=g.find(".vote-down-link"),"cancel"===e.data("value")&&(e.data("value","down"),e.closest("div").removeClass("voted-down"))); break;case "flag":"cancel"===b?(a.data("value","report"),a.closest("div").removeClass("marked-inapp"),a.closest(".ebay-review-section").removeClass("ghosted")):($(".inapp-spam-overlay").hide(),a.parent().append($(".inapp-success-overlay")),$(".inapp-reasons-list").find("input").attr("checked",!1),$(".inapp-action button").addClass("disabled"),a.parent().parent().find("div[name=vote]").removeClass(),$(".inapp-success-overlay").show(),setTimeout(function(){$(".inapp-success-overlay").hide()},5E3),a.data("value", "cancel"))}g.find("span.positive-h-c").text(f.result.votesPositive);e=f.result.votesTotal-f.result.votesPositive;g.find("span.negative-h-c").text(!isNaN(e)&&e)},function(){$(document).trigger("rover",{sid:"p2047675.m3946.l7075"})})}}else window.location=this.getSigninUrl(f)}}}); $(function(){function c(b,a){b.css({transform:"rotateZ(-"+a+"deg)","-ms-transform":"rotate(-"+a+"deg)","-moz-transform":"rotateZ(-"+a+"deg)","-webkit-transform":"rotateZ(-"+a+"deg)","-o-transform":"rotateZ(-"+a+"deg)"})}$(".pie").each(function(){var b=$(this).data("percent").split("%")[0],a=$(this).find(".left span"),d=$(this).find(".right span"),b="--"===b?0:b;50>=b?(a.hide(),c(d,180-360*(b/100))):c(a,180-360*((b-50)/100))})});raptor.defineClass("com.ebay.raptor.vi.reviews.ProductReviewsImagesOverlay",function(){var g,h;return{init:function(){this.pubsub=raptor.require("pubsub");g="_REVIEWS_IMAGES_LAYER_OPEN";h="_REVIEWS_LAZYLOAD_IMAGES";this.bindEventListener()},bindEventListener:function(){var a=this;$(".reviews-carsoul-thumbnails").on("click","button.review-pic",function(){var b=$(this);setTimeout(function(){a.handleImageCarsoulChanged(b)},0)});$(".rvwImageEnlarge").on("click","button",function(){var b=$(this);setTimeout(function(){a.handleImageCarsoulChanged(b)}, 0)});$(".vi_pl_panel").on("fluid-fs:navigate",function(a,d){var c=$(this).find(".reviews-carsoul-thumbnails ul li button[data-imageIndex="+d.current+"]");c.length&&($(this).find(".reviews-carsoul-thumbnails ul li button").removeClass("selected"),$(c[0]).addClass("selected"))});a.pubsub.subscribe(g,function(b){var d="rvwEnlargeImgLayer_"+b.attr("id").split("_")[1].split("_")[0];a.pubsub.publish(d+"_OPEN_VI_P_LAYER",{id:d});a.handleProductReviwsImageOverlayOpen(b)});a.pubsub.subscribe(h,function(b){a.initImagesLazyLoad(b)})}, handleProductReviwsImageOverlayOpen:function(a){var b=a.closest(".ebay-review-section").attr("id").split("_")[1],d=$("#rvwEnlargeImgLayer_"+b),c=d.find(".rvwImageEnlarge"),a=a.data("imageindex");$(".reviews-carsoul-thumbnails button").removeClass("selected");c.data("islazyloaded")||(this.initImagesLazyLoad(d.find(".reviews-images-overlay .review-pic-overlay-filmstip-main img")),this.initImagesLazyLoad(d.find(".reviews-carsoul-thumbnails button.review-pic img")),c.attr("data-islazyloaded",!0),c.filmstrip()); var e=c.data("__FS__INSTANCE"),f=e.props.current,c=Infinity==e.props.total?c.find(".review-pic-overlay-filmstip-main").length-1:e.props.total;e.props.total=c;e.isTransitioning=!1;e._clickHandler({data:f-a});d.find(".reviews-carsoul-thumbnails button[data-imageindex="+a+"]").addClass("selected");e.isTransitioning=!1;this.imageOverlayOpenClickTracking(a,b,c)},imageOverlayOpenClickTracking:function(a,b,d){$(document).trigger("rover",{sid:"p2047675.m3946.l8861",rvwid:b,rvwImageindex:1+parseInt(a),totalImages:1+ parseInt(d)})},initImagesLazyLoad:function(a){a.one("load",function(){for(var b=0;b(new Date).getTime()-b._resizeTime&&(clearTimeout(b._resizeFunc),b._resizeTime=(new Date).getTime());b._resizeFunc=setTimeout(function(){var a=b._getProps();b.props.total!==a.total&&(b.props.resized=!0,b._setButtons());b._resizeFunc=void 0},200)}));this.$el.on("click","ul > li",function(){b._eventPublisher(m,{type:"click",id:$(this).data(b.dataItemIdAttr)})});this._setButtons(); return this}var h="__FS_RESIZE",m="fluid-fs:click",i=!1;if("function"!==typeof $.fn.tact)throw Error("Tactile.js depedency is missing.");g.prototype._clickHandler=function(a,b,c){var d=this,e=this.$ul,f=this.props,g=this.isTransitioning,h=this._supportsTransitions,b=b||400,j=f.current,i=a.data-j,l=c||100*i+"%",k={};0===j&&1===a.data||(j===f.total&&-1===a.data||!0===g)||(this.isTransitioning=!0,this.transitionStartTime=(new Date).getTime(),h?(k=this.getTransObj(b/1E3),k[this._translate]="translate3d("+ l+",0,0)",e.css(k)):e.stop(!0,!0).animate({left:l},b,function(){d.isTransitioning=!1;f.offset=e.position().left}),void 0===c&&(f.current=Math.abs(i),this._setButtons(),this._eventPublisher("fluid-fs:navigate",{type:"navigate",dir:a.data,current:f.current})))};g.prototype._eventPublisher=function(a,b){this.$el.trigger(a,b)};g.prototype._dragHandler=function(a){var b=this.$ul,c=this.props,d=a.gesture.dir,e=c.offset+a.gesture.delta.x+"px",f=c.current;if(!this.isTransitioning)if("dragstart"===a.gesture.type)b.css(this.getTransObj(0)); else{if(0===f&&0a.gesture.delta.x/this.props.width)b.css(this.getTransObj(0.4)),e=-(100*f)+"%";else{a.gesture.velocity=0.5;this._swipeHandler.call(this,a);return}b.css(this._translate,"translate3d("+e+",0,0)")}};g.prototype._swipeHandler=function(a){if(this.isTransitioning)if(this.transitionStartTime+ 1E3<=(new Date).getTime())this.isTransitioning=!1;else return;var b={};b.delegateTarget=this.$el;b.data=a.gesture.dir;this._clickHandler.call(this,b,400/a.gesture.velocity)};g.prototype._getProps=function(){var a=this.$ul,b=a.find("li:first-child").width(),c=a.children("li").length,a=a.width(),d={},e=this.props&&this.props.current?this.props.current:0,f=this.props&&this.props.offset?this.props.offset:0;d.width=a;d.current=e;d.offset=f;d.total=Math.ceil(b*c/a)-1;return d};g.prototype._setButtons=function(){var a= this.$el,b,c=this.selectorPrev,d=this.selectorNext,e=!1;void 0===this.props||(e=!0===this.props.resized)?(this.props=b=this._getProps(),!0===e&&b.current>b.total&&(this.props.current=b.total,this._clickHandler({data:1},400,-100*b.total+"%"))):b=this.props;!1===this.mobiUX&&(a.find(c+","+d).attr("aria-disabled",!1),0===b.total?a.find(c+","+d).attr("aria-disabled",!0).css("visibility","hidden"):0===b.current?a.find(c).attr("aria-disabled",!0):b.current===b.total&&a.find(d).attr("aria-disabled",!0))}; g.prototype._translate=function(){var a=(document.body||document.documentElement).style,b=["Webkit","Moz","O","ms"],c;if("string"===typeof a.transform)return"transform";for(c=0;c= e.screenX-c.sX?-1:1,c.dX=e.screenX-c.sX,c.dY=e.screenY-c.sY,!c.userDragging&&0.5f&& 10>d&&(delete a.gesture.dir,delete a.gesture.delta,a.gesture.type="tap",b.trigger("tact:tap",a))},touchcancel:function(a){this.handlers.touchend(a)}},k=function(a,b,c){var e=b.$el.data("__TACTILE_LISTENER_BOUND");1===a&&(void 0===e||!1===e)?(a=function(a){j[c].call(b,a)},b.handlers[c]=a):a=b.handlers[c];return a},l=function(a,b,c){return function(e,d){c.settings.enabled&&b[a].call(c.$el[0],d)}};f.prototype._bindEvents=function(a,b){var c=1===a?"add":"remove",e=this.$el.get(0),d,g,f;g=0;for(f=i.length;g< f;g++)e[c+"EventListener"](i[g],k(a,this,i[g]));this.$el.data("__TACTILE_LISTENER_BOUND",!!a);if("add"===c&&b)for(d in this.settings.enabled=1,b)if(b.hasOwnProperty(d)){if("function"===typeof b[d])this.$el.on("tact:"+d+".tact",l(d,b,this));-1",{rel:"stylesheet",type:"text/css",href:a.cssUrl}).appendTo("head"); a&&a.jsUrl&&$.ajax({url:a.jsUrl,dataType:"script",cache:!0,async:!0,success:function(){b.updateFooterCnt(a)},fail:function(){}})},loadBidJS:function(a){a&&(a.bidRedesignTest&&a.bidRedesignJSUrl)&&$.ajax({url:a.bidRedesignJSUrl,dataType:"script",cache:!0,async:!0,success:function(){window.ShoppingCTALayer&&new ShoppingCTALayer({width:"540px"})},fail:function(){}})},loadJsScource:function(a){if(a){var b=document.createElement("script");b.type="text/javascript";b.src=a;b.async=!0;document.getElementsByTagName("head")[0].appendChild(b)}}, updateMerch:function(a){var b=this;if(a=a.body["vi-merch-abf"]){var c=[];if(a){var d=document.createElement("div");d.innerHTML=a;$.each($(d).find("script"),function(a,b){b&&b.src&&(c.push(b.src),$(b).remove())});$("#vi-merch-abf").html($(d).html());$.each(c,function(a,c){b.loadJsScource(c)})}}},updateFooterCnt:function(a){a.foot&&0"),b=60,f=a.timeLeftOffScreenMessage,c=a.offScreenMessage,d=a.timerId;e.attr("role","timer").attr("aria-live","polite").attr("id",d).addClass("timer-offscreen");1>a.timeLeft.hour&&($("#"+d)&&0==$("#"+d).length&&a.insertionPoint.append(e),59==a.timeLeft.minute&&59==a.timeLeft.second&&(c=c.replace("##1##",b),$("#"+d).text(f+a.sourceOfTimerText+c)),59>=a.timeLeft.minute&&(0==a.timeLeft.second&&0h-1)){if(""===f)return!1;f=a&&a.vpqpModel&&a.vpqpModel.volumePricingOfferModel&&a.vpqpModel.volumePricingOfferModel[b]&&a.vpqpModel.volumePricingOfferModel[b].quantity?a.vpqpModel.volumePricingOfferModel[b].quantity:""}h=a&&a.vpqpModel&&a.vpqpModel.volumePricingOfferModel&&a.vpqpModel.volumePricingOfferModel[b]&&a.vpqpModel.volumePricingOfferModel[b].discountValueStrPercent?a.vpqpModel.volumePricingOfferModel[b].discountValueStrPercent: "";j=a&&a.vpqpModel&&a.vpqpModel.volumePricingOfferModel&&a.vpqpModel.volumePricingOfferModel[b]&&a.vpqpModel.volumePricingOfferModel[b].afterDiscountItemPricePerUnitWithSymbol?a.vpqpModel.volumePricingOfferModel[b].afterDiscountItemPricePerUnitWithSymbol:"";a=a&&a.vpqpModel&&a.vpqpModel.volumePricingOfferModel&&a.vpqpModel.volumePricingOfferModel[b]&&a.vpqpModel.volumePricingOfferModel[b].afterDiscountItemPriceDouble?a.vpqpModel.volumePricingOfferModel[b].afterDiscountItemPriceDouble:"";for(b=0;b< $(g).length;b++)$(g).removeClass("vi-vpqp-sel");$(d)&&(0<$(d).length&&0=d||g.hasClass(b)||(d=$(a.constants[f]),g=d.hasClass(b),d.removeClass("POSITIVE NEGATIVE NEUTRAL"),g||(d.addClass(b),c&&(e=e.find(".byrfdbk_tot_pos_txt").text(),d.find(a.constants.feedbackSelVarClz).text(e))),a.track(d))}}var a=this,h=$(this.constants.leftNavFltrClz);a.pubsub=raptor.require("pubsub");$(a.constants.feedbackMr).on("click", function(){var f=$(this),b=f.closest(a.constants.feedbackContId);b.is(".POSITIVE,.NEGATIVE,.NEUTRAL")&&b.removeClass("POSITIVE NEGATIVE NEUTRAL");a.track(f)});h.on("click",b("feedbackContId",!0));$(a.constants.modalNavFltrClz).on("click",b("modalContId"));$(a.constants.modalNavFltrClz).on("keypress",function(a){if(32===a.keyCode||13===a.keyCode)a.preventDefault(),this.click()});$(a.constants.atfLinkId).on("hover",function(){var b=$(this);b.off("mouseenter mouseleave");a.track(b.find("#byrfdbk_atf_lnk_sm"))}); $(a.constants.atfLinkId).on("click",function(b){if($(b.target).hasClass("byrfbdk_seller_link"))return!0;c.modalEnabled?$("html body").css({height:0,overflow:"hidden"}):$(a.constants.btfContId)[0].scrollIntoView();a.track($(this))})},track:function(c){var b=c?c.attr("trk"):null;b&&($(document).trigger("rover",{sid:b}),c.removeAttr("trk"))}}});raptor.defineClass("ebay.viewItem.Scandal",function(){var b=0;return{init:function(a){this.cfg=a;this.adsMap=a.adsMap;this.cfg&&this.cfg.collapseEmptyAdsAfterFetchCall&&(this.cfg.emptyAvipLeaderBoard&&$("#scandal100938").hide(),this.cfg.emptyCvipLeaderBoard&&$("#scandal100939").hide());this.adsMap&&this.callAds(this.adsMap)},callAds:function(a){try{for(var c={},b=this.cfg&&this.cfg.adsPbPids?this.cfg.adsPbPids:[100562,100563,100564,100565,100566,100567,100568,100610,100916,100917,100918,100919,100920, 100921,100922,100923,100938,100939,100726,100727],d=0;d").css("display","none");$trk.onRover(null,a);$trk.image=c}raptor.require("ebay.profiler.Profiler").addParam("i_13i",b)},getPubTypeForAd:function(a){return 0<= a&&this.cfg&&this.cfg.adsPbType&&ab.min_scroll_time_&&(c=0);b.scroll_timer_=window.setTimeout(function(){b.last_scroll_time_= (new Date).getTime();b.scrollHandler();b.scroll_timer_=null},c)}},chunkTimers:function(){topEnd&&(centerStart&&0!=topEnd&&0!=centerStart)&&this.Profiler.addParam("i_5i",centerStart-topEnd)}}});